This week's book giveaway is in the Android forum.
We're giving away four copies of Android Programming: The Big Nerd Ranch Guide and have Bill Phillips & Chris Stewart on-line!
See this thread for details.
Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

set multiple session attribute  RSS feed

 
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: 2070
  • 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
Boost this thread!