File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Login page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Login page" Watch "Login page" New topic

Login page


Joined: Jul 09, 2005
Posts: 18
Hi friends,

Advance thank's for replying to me.

In struts i want to check UserName and Password with out going to Database.

how can i do this please suggest me.
Gaurav Chhabras
Ranch Hand

Joined: Sep 21, 2005
Posts: 126
you can put the Username ans Password in config file and read from there and check out.
Pratik Lohia
Ranch Hand

Joined: May 05, 2005
Posts: 88
On application startup, you can obtain all the usernames and passwords and store them in an arraylist in
the session. Thereafter you can obtain these in your jsp from the arrayList and compare the user entered user names and passwords and verify.
However, note that this will manke your session object size heavy, and morethe number of users, greater will be the disadvantage, as compared to a server or database hit.
Jiju Jacob

Joined: Jul 12, 2005
Posts: 5
I agree with Pratik Lohia. One small suggestion, instead of maintaining as a session object, you can construct a class that can act as a cache and when ever you need, this object may be referred. Implement this class as read/load once with a singleton instance available in memory. So the first time the user info is requested, you can load the properties and all further requests may just read it from this one. The difference is that all user info is maintained out of session.

Thanks,<br />Jiju
I agree. Here's the link:
subject: Login page
It's not a secret anymore!