Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

some about apache tomcat session?

 
zhua zhou
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are setting the session's size and live time in one project?
How the session and memory's relation?
thanks!
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13073
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a session timeout in the default web.xml that gives timeout in minutes:

You can also set the timeout for any session - see the HttpSession API.
Your only control over session size is the amount of stuff you store in it. If everything saved in a session is Serializable, most servlet engines can save it to disk.
Bill
 
Ken Shamrock
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the usage of "Serializable"?Thanks
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13073
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Serializable is an interface - it doesn't define any methods - it is just used as a label. So if you declare your class as implements Serializable, Java object serialization will attempt to serialize an instance.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic