You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Shabada, Gnaneshwer" <sh...@toysrus.com> on 2004/09/29 17:02:34 UTC

Detecting the previous JSP

Hi.

Is there any way in Struts I could determine dynamically what
JSP/screen/action am coming from when I am in a certain screen. I have a
scenario where I can delete users from a result list page or a member
details page. I want to use one action to do both. But to code my action
easier I want to determine what page I am invoking the delete action. Is
there anything inbuilt in Struts to determine that?

Thanks
Gnan

======================================================================== 
This email message is for the sole use of the intended recipient (s) and may
contain confidential and privileged information. Any unauthorized review,
use, disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message. To reply to our email administrator directly, send
an email to EmailAdmin@toysrus.com. 
Toys "R" Us, Inc.

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


Re: Detecting the previous JSP

Posted by Jeff Beal <jb...@webmedx.com>.
Shabada, Gnaneshwer wrote:
> Hi.
> 
> Is there any way in Struts I could determine dynamically what
> JSP/screen/action am coming from when I am in a certain screen. I have a
> scenario where I can delete users from a result list page or a member
> details page. I want to use one action to do both. But to code my action
> easier I want to determine what page I am invoking the delete action. Is
> there anything inbuilt in Struts to determine that?
> 
> Thanks
> Gnan
> 
> ======================================================================== 
> This email message is for the sole use of the intended recipient (s) and may
> contain confidential and privileged information. Any unauthorized review,
> use, disclosure or distribution is prohibited. If you are not the intended
> recipient, please contact the sender by reply email and destroy all copies
> of the original message. To reply to our email administrator directly, send
> an email to EmailAdmin@toysrus.com. 
> Toys "R" Us, Inc.
If you feel like trusting the user's browser ;) , try the REFERER field 
in the HTTP header (http://www.w3.org/Protocols/HTTP/HTRQ_Headers.html#z14).

For a better solution, 
http://www.javaworld.com/javaworld/jw-09-2004/jw-0913-struts-p3.html has 
about three sentences about using a Stack object in session scope to 
maintain such a history.

-- Jeff


R: Detecting the previous JSP

Posted by Amleto Di Salle <di...@di.univaq.it>.
Hi,
you can use org.apache.struts.actions.DispatchAction instead of Action.
See Struts documentation.
I never used it, but if i remember correctly there was a bug ("recursive
call") related to it.

BR
/Amleto Di Salle



-----Messaggio originale-----
Da: Shabada, Gnaneshwer [mailto:shabadag@toysrus.com] 
Inviato: mercoledì 29 settembre 2004 17.03
A: 'Struts Users Mailing List'
Oggetto: Detecting the previous JSP 



Hi.

Is there any way in Struts I could determine dynamically what
JSP/screen/action am coming from when I am in a certain screen. I have a
scenario where I can delete users from a result list page or a member
details page. I want to use one action to do both. But to code my action
easier I want to determine what page I am invoking the delete action. Is
there anything inbuilt in Struts to determine that?

Thanks
Gnan

========================================================================

This email message is for the sole use of the intended recipient (s) and
may contain confidential and privileged information. Any unauthorized
review, use, disclosure or distribution is prohibited. If you are not
the intended recipient, please contact the sender by reply email and
destroy all copies of the original message. To reply to our email
administrator directly, send an email to EmailAdmin@toysrus.com. 
Toys "R" Us, Inc.

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


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