I want to go back to the login page if the user forgets to enter either his email address or his password.
I remember it worked very well yesterday with
tomcat under Win2k.
How come it does not work today. I don't understand the problem. Is it a bug or something?
The part of the
servlet code is attached here:
String emailAddress=request.getParameter("emailAddress");
String password=request.getParameter("password");
if((emailAddress==null)||(password==null) )
{ gotoPage("/jsp/myproject/login.jsp", request, response);
}
private void gotoPage(String address,
HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException
{ RequestDispatcher dispatcher
=getServletContext().getRequestDispatcher(address);
dispatcher.forward(request, response);
}