This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Servlets and the fly likes How to write servlet to maintain session Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to write servlet to maintain session" Watch "How to write servlet to maintain session" New topic
Author

How to write servlet to maintain session

gayathri reddy
Greenhorn

Joined: Mar 29, 2001
Posts: 17
Hi ,
I never used seesion till now and for my application i want to maintain seesion.like when user enters the username/password it should ckeck in database and if it is correct it should maintain the session till he/she log off.i wrote one servlet but don't know where to place it.
thanks
-greddy
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
You may have to put your login object in session. First create a user session and do session.setAttribute(***,****);
A sample code is here.
regds
maha anna
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to write servlet to maintain session