This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes JSP and the fly likes how to use login name in other pages?(without cookies) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "how to use login name in other pages?(without cookies)" Watch "how to use login name in other pages?(without cookies)" New topic
Author

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

Caven Wang
Ranch Hand

Joined: Jul 07, 2001
Posts: 31
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?


@_@ Life is so nice!
Roy Ben Ami
Ranch Hand

Joined: Jan 13, 2002
Posts: 732
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to use login name in other pages?(without cookies)
 
Similar Threads
How to secure web resources by using MS Active Directory as LDAP Server?
To change password using servlet
How to do logout in struts application
Jmeter
automatic login with java