This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to use login name in other pages?(without cookies)

 
Caven Wang
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can the login information in other pages? for example, the visitor inputs his username and password in the index.html. The name and password are checked in the login.jsp. If passed the checking, it will be directed to a welcome.jsp. What should I do now?
 
Roy Ben Ami
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well, without using cookies explictly (it does use cookies but not by us) you can set attributes to the session object and check it in the other jsp or servlet.
for example:

assuming username is a String.
in the other servlet or jsp you can retrieve this attribute and check if it is equal to the username.
thats it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic