Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

What is the use of serializable beans in jsp file?  RSS feed

 
shyam ji gautam
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
as per my knowledge serialization means save the state of object into file or means persistent state.

but i read some where that it is good to to use serialization java beans class in your jsp page but i am confusing means here why we need of serialization for jsp please explain me this concept behind this or any example or real time scenario or any code


thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With respect to JSP, serialization is not useful for beans that exist only during the duration of a request. Beans that will be stored in session or application scopes should be serializable, as under certain circumstances (clustering for example), the container may wish to serialize them.
 
shyam ji gautam
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:With respect to JSP, serialization is not useful for beans that exist only during the duration of a request. Beans that will be stored in session or application scopes should be serializable, as under certain circumstances (clustering for example), the container may wish to serialize them.



so, how the serialization will be helpful for container means in which context , container will use it ?

any suggestion

thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I already answered that. If you want more details, you'll need to look into the documentation, or perhaps even the code, of the particular servlet container in which you are interested.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!