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

HttpSession

 
Bala Krishniah
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am creating the session in one servlet and storing the required data into it.
Is it possible to get the sesion, append the data into the session and store in back into the session in the same method repeatedly (ie 3 times) ie everytime the servlet called.
for ex:
class MyServlet
{
if( first time this servlet called)
{
session = request.getSession(true);
session.putValue(...);
}
if( second time this servlet called)
{
session = request.getSession(true);
session.putValue(...);
}
if( second time this servlet called)
{
session = request.getSession(true);
session.putValue(...);
}
}
Thanks
 
sameera k
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes it is possible to do so
every time the servlet is called u just keep the value name same and u can change the value
it just overwrites the previous value
thanks
sameera
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic