1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

servlet code to print date

Discussion in 'Java' started by angad_aks, Feb 16, 2011.

  1. angad_aks

    angad_aks Banned

    Joined:
    Feb 15, 2011
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    0
    Code:
    import java.io.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class DATE extends HttpServlet
    {
         public void doGet(HttpServletRequest request, HttpServletResponse          response)throws ServletException, IO Exception
         {
            PrintWriter pw=response.getWritet();
            Date today= new Date();
            pw.println("date is");
            pw.println(today);
          }
    }
    
     

Share This Page