This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Reading password information from a text file.

 
gautam anand
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a jsp page with two text fields named username and password. When the user clicks the submit button i need to perform a check if the password and username provided are correct. The username and passwords are stored in a text file as :

username=xyz
password=abc

username=klm
password=pqfja
username=ashsad
password=shhdsf
.
.

Please let me know how can I read this information from the file.

Your help would be sincerely appreciated.

Thanks
Gautam
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64182
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Reading from a file whether you are in a JSP or a plain-old Java program is the same, Btw, why are you doing this in a JSP rather than a Servlet?

Regardless, I'm moving this off to the I/O Forum.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic