This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes Reading password information from a text file. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Reading password information from a text file." Watch "Reading password information from a text file." New topic
Author

Reading password information from a text file.

gautam anand
Greenhorn

Joined: Jun 02, 2004
Posts: 22
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

Joined: Jan 10, 2002
Posts: 63208
    
  69

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Reading password information from a text file.
 
It's not a secret anymore!