Forums Register Login

Servlet not dircting to the next page

+Pie Number of slices to send: Send
Hi,
I am trying to publish the web application i have. However i have this problem that at first when the user tries to log in, the login.jsp will take to the loginServlet which will if the login successfuly will take to homepage.jsp. I believe the username and password are being passed to the servlet since in the URL i get something like: ... /LoginServlet?user=hh&pass=hh

However it gives me error : The page you are looking for might have been removed, had its name changed, or is temporarily unavailable. HTTP Error 404 - File or directory not found.

i dont know where is the problem Please advise.. it will be appreciated.

The code of the servlet is below ..

+Pie Number of slices to send: Send
Try


and then


Regards
+Pie Number of slices to send: Send
Hi Lino,
Thanks for your reply..
i tried what you have suggested.. but it gave me error: the method getServletContext() is not defined for the ServletContext
so i had to change the method. to this



I have tried the above code but it still gives me the same error that the The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.
--------------------------------------------------------------------------------
Please advise

I have also one question, this error does it mean that the servlet does not forward to the jsp (HomePage) in a way that HomePage is not available.. OR it also mean that the username and password wasn't checked from the first place? actually i dont know if it accessed the database or not..


Thanks in advance

Hend
I found some pretty shells, some sea glass and this lovely tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 2097 times.
Similar Threads
Simple AJAX query what I'm missing?
display the log/output in JSP or HTML page
Servlet jdbc problem
Not able to navigate the user to another jsp in servlets using RequestDispatcher
problem while executing the JAR written using ANT
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 20:27:43.