• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Servlet not dircting to the next page

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ..

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try


and then


Regards
 
Hend Ahmed
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic