struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "dderry" <dde...@acm.org>
Subject Re: Request scope question again...
Date Sat, 23 Feb 2002 01:22:53 GMT
Hey Theron,

Let me take a shot at this for you. I don't claim to be an expert (except
when applying for a job ;-) ), so hopefully an expert will correct any
mis-information.

Page scope is valid only for a single page. Typically this MAY be the same
as request scope. However, if your Action class performs a forward to a
different page (or action), page scope will change (because it is a new
page), but it is still the same request scope. Request scope changes when
the browser makes a request of the server. So a redirect (rather than a
forward) will terminate request scope because the browser has to make an
additional request to retrieve the desired page.

When the user his the back button, NO beans will be used. remember that
beans reside on the server (all JSP activities are server side). The beans
work with the JSP to generate an HTML document that is delivered to the
browser to render. Hitting the back button merely retrieves this previously
rendered HTML document from the browser cache; no request is made to the
server.

Hopes this helps to clarify things for you. And if I have misspoken, I hope
that someone will correct me.

Dave D


----- Original Message -----
From: <theron.kousek@webmd.net>
To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
Sent: Friday, February 22, 2002 6:40 PM
Subject: Request scope question again...


>
> Hi Folks:
>
> How can I determine "when" a bean/form in request scope has "terminated"?
> Will  hitting the "back" button on the browser and bringing up JSP pages
> that use beans in "request" scope  be using "invalid" beans in that case
> (since they have scope=request)?
>
> I'm still trying to figure out the difference between request scope and
> page scope.
>
> thanks,
> Theron
>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message