File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes To show the Error message at the login.jsp page using servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "To show the Error message at the login.jsp page using servlet" Watch "To show the Error message at the login.jsp page using servlet" New topic
Author

To show the Error message at the login.jsp page using servlet

Shivoham Pandey
Greenhorn

Joined: Jan 05, 2010
Posts: 1
Hi folks
I am doing a project for which i need to display the error message to the same login.jsp page using servlet.Error messages should be of there types:
For invalid username:invalid user name
For invalid password:Invalid password
For Invalid username or password:user details are not found in database
I am doing these validation against MS-Access Database.
I have written a code which is giving only one type of error:
Thats :For Invalid username or password:user details are not found in database.
Please help me out.Thanks in Advance


This code is working fine for the third type of Error.
I have also written a code to display all the three errors.But it is not working
.

Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Welcome to Javaranch

your logic[the way of querying the DB] is false. check the DB for username,if it is not in DB,then show first error message else go for password checking..and etc... go ahead.

but really what is the use of displaying these many errors ?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: To show the Error message at the login.jsp page using servlet
 
Similar Threads
no error message display for invalid user and password authentication
how to connect databas using odbc in servlet
error message from servlet to jsp
user authentication servlet problem
Help with this code!