Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to write servlet to maintain session

 
gayathri reddy
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1467
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic