• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hi

 
Graham Thorpe
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic