struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas De Loof" <nicolas.del...@cgey.com>
Subject Re: request object and frames
Date Tue, 18 Feb 2003 16:44:32 GMT
Here is what I undersand :

1. your action puts some beans into request scope
2. it forwards to a JSP, let's say A.jsp
3. A.jsp defines a framest, containing B.jsp
4. B.jsp looks in request for the bean.


As frameset is the response your browser gets from the 1. request, it has to
make a second request to get the frame content (B.jsp) and you get a NEW
empty request scope.

Solution 1 :
1st action does nothing but forward to A.jsp. A.jsp defines a frameset,
containing an action "B.do" that can put datas in request scope.

Solution 2 :
same, but 1st action puts datas in session scope, "B.do" action remove them
from session and put it in request for B.jsp.

Solution 3 (ugly but sometime usefull):
1st action puts datas in session scope and B.jsp remove it after using.

Best solution depends the reason you come into a frameset :
if result is allways in a  frameset, 1 is best.
if result will be a frameset on some condition, look at 2 or 3

Nico.



> I've had problems with getting objects out of my reqest object for a
> particular page and I suspect that it's because the page that I am
> calling the object from is in a frame. Would the page being inside a
> frame keep me from accessing an object that my previous action had set
> in the request? Thanks.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org


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


Mime
View raw message