File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes hi Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "hi" Watch "hi" New topic
Author

hi

Graham Thorpe
Ranch Hand

Joined: Mar 25, 2002
Posts: 265
Hi
How can i store my username and password when i open my website.I mean i want to store my username and password at whole time .So how can i proceed
Hari babu
Ranch Hand

Joined: Jun 25, 2001
Posts: 208
Hi,
you can store that in servletContext. But not sure what you are trying to do by storing username and Password in application context.
Hari
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

If you are refering to loging in, you should look into the J2EE authentication mechanisms.
You can (for example) define a login screen, the username and password will be validated automaticaly for you and stored on the session. Have a look at Basic or Form-based authentication.
Also see HttpServletRequest.getRemoteUser() and HttpServletRequest.getUserPrincipal() to see how the security details are stored internally.
Please try to use more descriptive topics in your threads. Help us help you.
thanks,
Dave
Graham Thorpe
Ranch Hand

Joined: Mar 25, 2002
Posts: 265
Hi
Actaully i need to develop forumn website my self.
so according to this website i need to store password and username in client pages once visit website.So which concept i can use for this facility.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
u could use persistent cookies to store the username on the client . Storing the password in the same cookie is also possible provided the Client selects to do so as we find on several sites with The Remember Me CheckBox.
 
wood burning stoves
 
subject: hi
 
Similar Threads
How to store userName and password in Database?
Struts Validator
JMS createQueueConnection (username,password)
Tough authentication question?
How to store userName and password in Database?