import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.util.*; public class ServFindProblem extends HttpServlet { //Initialize global variables public void init(ServletConfig config) throws ServletException { super.init(config); } //Process the HTTP Get request public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = new PrintWriter (response.getOutputStream()); try{ response.setContentType("text/html"); String userName = request.getParameter("userName"); //JDBC routine to check user exists. If success then return out.println(userName + System.currentTimeMillis()); } catch(Exception ex){ ex.printStackTrace(); } finally{ out.close(); } } //Get Servlet information public String getServletInfo() { return "Test.ServFindProblem Information"; } }