This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
hi, I want to direct to another page if a user is not present in the database.How do I go about doing this.The servlet gets the username and password from the html/jsp page. The servlet checks whether the use is present in the database,if the user and password is not present in the database,The user must be given an option for registration,a link to the register.jsp page. Hope that I have rightly phrased the question.Hoping to hear ASAP. Thanks in advance. as
If I understand you correctly, what you want is the sendRedirect capability of the HttpServletResponse object. You should decide to redirect before writing any output to the response and should do a return from the servlet without trying to do anything else with the response. An alternative would be to use the RequestDispatcher forward method. Bill
Joined: Nov 13, 2003
Hi, Thanks for the information.I will try what you have adviced.Will keep posting. As