import java.io.*;
import java.util.Date;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class MyServlet extends HttpServlet
{
    protected void doGet(HttpServletRequest request,
            HttpServletResponse response) throws ServletException, IOException
    {
        OutputStream out;
        ObjectOutputStream objStream;
        out = response.getOutputStream();
        objStream = new ObjectOutputStream(out);
        Date d=new Date(System.currentTimeMillis());
        objStream.writeObject(d);
        objStream.flush();
        objStream.close();
    }
}
