• Post Reply Bookmark Topic Watch Topic
  • New Topic

Bind class to HttpSession?  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am designing a simple web app which looks up payments.

The application will be deployed into a redundant environment.

How can the following class be designed to be bound to an HttpSession?



The front end will be something like this:



Thank you very much.
 
Marshal
Posts: 56926
174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

I think that question is too difficult for "beginning", so I shall move it.
 
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want an object reference to be stored in a HttpSession reliably, you must make the class Serializable.

The reason being that the servlet container is allowed to serialize the session to disk any time it wants to. If all the bound objects are not serializable you will get an error.

Bill

 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!