Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

regarding session  RSS feed

 
satya saha
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is meant by session data and global data and how to implement these things(example code).
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
session data-for particular user
global data-for particular application(servlet context)

Hope This Helps
 
satya saha
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for reply
i got an idea but i need some example code for that so that i will get clear idea
 
Shahnawaz Shakil
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Satyasri,
A bit of effort on Google will give you lot of code. Just remember that HTTPSession and ServletContext object can be used to share the data around session and application respectively. Both provide setAttribute and getAttribute method to mutate and get a value.This much of hint should be enough to start with.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66184
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"satyasri ch", please check your private messages for an important administrative matter.
 
Sachin Joshi
Ranch Hand
Posts: 83
Java Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simple way to understand session is think of a mail site where you login for checking your mails. You may read,send,delete or do some other things until you logout. So from the time you logged in till you logout is your session. Any data which you want to use for this much period can be stored in HttpSession object so that you can re-use it.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!