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

set multiple session attribute

 
krunal prajapati
Greenhorn
Posts: 19
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
I am beginner for session in servlet.

can I set multiple session attribute in my servlet class
for Example.


I am maintain session with the use of loginID.

and username is for showing welcome + "username" while you login.

and rec_id is pk - for my main table.

then, am I right with this code.
 
Jesus Angeles
Ranch Hand
Posts: 2068
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
krunal prajapati wrote:hi
I am beginner for session in servlet.

can I set multiple session attribute in my servlet class
for Example.


I am maintain session with the use of loginID.

and username is for showing welcome + "username" while you login.

and rec_id is pk - for my main table.

then, am I right with this code.


Yes, you can.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic