• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Login page  RSS feed

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can put the Username ans Password in config file and read from there and check out.
 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I didn't like the taste of tongue and it didn't like the taste of me. I will now try this tiny ad:
ScroogeXHTML - small and flexible RTF to HTML converter library
https://coderanch.com/t/710903/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!