[Opensource] Use request instead of Output, is it ok?
Michael Rimov
rimovm at centercomp.com
Mon Aug 12 16:10:26 PDT 2002
At 09:19 AM 8/11/2002 -0700, you wrote:
>hi Mike,
>
>Thanks for replying. Can u comment on the following:
>
>-- If I'm going to keep the object persistent through
>few JSP pages, I should keep it in
>HTTPPersistentSession? So in JSP, I can get the
>session by?:
>
>HTTPPersistentSession s = new
>HTTPPersistentSession(request,response);
>
>And in the controller, I can get the session by:
>
>HTTPPersistentSession s =
>(HTTPPersistentSession)request.getSession();
>
>-- For HTTPPersistentSession, setAttribute() is for
>setting attribute for request (attribute only remains
>for the current request) and setPersistentAttribute()
>is for setting attribute to persist in the session?
>When using setAttribute(), don't need to execute
>removeAttribute()? When using
>setPersistentAttribute(), need to remove
>removePersistentAttribute() to release the memory
>space taken up by the attribute in the session?
>
>So are the above correct before I start coding...
I doublechecked the code and yes, you are correct.
-Mike
More information about the Opensource
mailing list