[Opensource] Use request instead of Output, is it ok?
Innovest Ken
innovest_11 at yahoo.com
Sun Aug 11 09:19:53 PDT 2002
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...
Thanks!
Innnovest
--- Michael Rimov <rimovm at centercomp.com> wrote:
> At 09:08 PM 8/9/2002 -0700, you wrote:
> >hi,
> >
> >There is this object I'm going to pass over to JSP.
> If
> >I intend to set the object in the Request in the
> >Controller, then how from the JSP, can I get the
> >object? How do I get the ControllerRequest in the
> JSP?
> >
> >So that I can get the object in JSP, and do the
> >scriptlet in JSP instead of using Output and tag
> >library. Find using Tag library a headache
>
> The ControllerResponse object is stored in the
> session when you're
> forwarded to the JSP. It's key is
> Controller.RESPONSE_KEY... so you should
> be able to get at it that way.
>
> HTH!
>
> -MIke
>
> _______________________________________________
> Opensource mailing list
> Opensource at jcorporate.com
>
http://mail.jcorporate.com/mailman/listinfo/opensource
> Archives:
http://mail.jcorporate.com/pipermail/opensource/
__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com
More information about the Opensource
mailing list