• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

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

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

 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ?
 
A day job? In an office? My worst nightmare! Comfort me tiny ad!
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic