Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

request attributes/properties  RSS feed

 
John Molitor
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
do all objects set in the request need to be serializable?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Doesn't seem like an I/O question to me. Did you mean to post this in Servlets?

In any case, moved there.
[ January 25, 2007: Message edited by: Bear Bibeault ]
 
William Janssen
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure if I understand your question, but if it relates to a http request comming from a client crossing some netwerk. The objects need to be serialized in order to get them across.
 
John Molitor
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I set a Domain object in the request so the jsp can display the data, does that Domain object need to implement serializable?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assuming you are talking about a request that is going to be handled in the same servlet container, no. The JSP (servlet code), being in the same JVM memory space, can get it directly.

It is objects that need to be held in a session for longer than a single request/response cycle that should be serializable.

Bill
 
John Molitor
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the information. That's what I thought, but I couldn't find any info on validating it.
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Request objects are never serialized so its not required to serialize all the attributes which you plan to put in request scope.However you need to serialize objects in case you want to put those in session scope.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!