GeeCON Prague 2014*
The moose likes JSP and the fly likes jsp display Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "jsp display" Watch "jsp display" New topic
Author

jsp display

pavan vallamkonda
Greenhorn

Joined: Feb 06, 2013
Posts: 1
here is the code for svalidate.jsp when entering login details and submiting getting a blank page
please help us out



D. Ogranos
Ranch Hand

Joined: Feb 02, 2009
Posts: 214
First obvious question: Are you sure this .jsp is executed when you submit your login form (you have a System.out.println to print the password, does it appear in the server log)? If the .jsp is indeed executed, then go on step by step, add some more System.out.println to see how the code flows (one for success case, one for failed login case). If the code is called correctly, then your frame page parts may not be accessible, so check that out.

That said, you have a SERIOUS mess here. JSPs should not contain Java code (especially not database operations), it should be in its own Java class (probably a servlet controller). Then you introduce security problems by making a direct query to the database (look up PreparedStatement).

Honestly, I would completely scrap this and rewrite it cleanly, using a servlet controller for the login process, and JSPs only for the view.
 
GeeCON Prague 2014
 
subject: jsp display