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/12/17 17:38:17 UTC

Determine the previous action

Hello,
How can I determine the previous action I executed in Struts. I would like
to know which Action/Screen I came from and appropriately do something in my
application. Is there anyway I could do that?

TIA
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: Determine the previous action

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
It actually strikes me as VERY curious that such a thing isn't already 
done by Struts (if in fact it isn't).  Thinking about it, I know that 
you can get the ActionMapping that was last executed through request... 
Wouldn't that give you all you need?

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

Jim Douglas wrote:
> 
> Couldn't you set an attribute and change the attribute value when you 
> perform an Action or Submit a screen?
> 
> 
> 
>> From: "David G. Friedman" <hu...@ix.netcom.com>
>> Reply-To: "Struts Users Mailing List" <us...@struts.apache.org>
>> To: "Struts Users Mailing List" <us...@struts.apache.org>
>> Subject: RE: Determine the previous action
>> Date: Fri, 17 Dec 2004 16:42:50 -0500
>>
>> Gnan,
>>
>> The two basic options are:
>>
>> 1) Hope all browsers visiting your site send the http "REFERER" 
>> field.  Not
>> all do.
>>
>> 2) Make navigation use forms and submit a hidden parameter holding the 
>> URL
>> of the page that kicked out the JSP/HTML/form.
>>
>> Regards,
>> David
>>
>> -----Original Message-----
>> From: Shabada, Gnaneshwer [mailto:shabadag@toysrus.com]
>> Sent: Friday, December 17, 2004 11:38 AM
>> To: 'user@struts.apache.org'
>> Subject: Determine the previous action
>>
>>
>>
>> Hello,
>> How can I determine the previous action I executed in Struts. I would 
>> like
>> to know which Action/Screen I came from and appropriately do something 
>> in my
>> application. Is there anyway I could do that?
>>
>> TIA
>> 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
>>
> 
> 
> 
> ---------------------------------------------------------------------
> 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


RE: Determine the previous action

Posted by "David G. Friedman" <hu...@ix.netcom.com>.
Jim,

I think that was what I wrote in suggestion #2. :)

Regards,
David

-----Original Message-----
From: Jim Douglas [mailto:jdz99@hotmail.com]
Sent: Friday, December 17, 2004 6:00 PM
To: user@struts.apache.org
Subject: RE: Determine the previous action



Couldn't you set an attribute and change the attribute value when you
perform an Action or Submit a screen?



>From: "David G. Friedman" <hu...@ix.netcom.com>
>Reply-To: "Struts Users Mailing List" <us...@struts.apache.org>
>To: "Struts Users Mailing List" <us...@struts.apache.org>
>Subject: RE: Determine the previous action
>Date: Fri, 17 Dec 2004 16:42:50 -0500
>
>Gnan,
>
>The two basic options are:
>
>1) Hope all browsers visiting your site send the http "REFERER" field.  Not
>all do.
>
>2) Make navigation use forms and submit a hidden parameter holding the URL
>of the page that kicked out the JSP/HTML/form.
>
>Regards,
>David
>
>-----Original Message-----
>From: Shabada, Gnaneshwer [mailto:shabadag@toysrus.com]
>Sent: Friday, December 17, 2004 11:38 AM
>To: 'user@struts.apache.org'
>Subject: Determine the previous action
>
>
>
>Hello,
>How can I determine the previous action I executed in Struts. I would like
>to know which Action/Screen I came from and appropriately do something in
>my
>application. Is there anyway I could do that?
>
>TIA
>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
>



---------------------------------------------------------------------
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


RE: Determine the previous action

Posted by Jim Douglas <jd...@hotmail.com>.
Couldn't you set an attribute and change the attribute value when you 
perform an Action or Submit a screen?



>From: "David G. Friedman" <hu...@ix.netcom.com>
>Reply-To: "Struts Users Mailing List" <us...@struts.apache.org>
>To: "Struts Users Mailing List" <us...@struts.apache.org>
>Subject: RE: Determine the previous action
>Date: Fri, 17 Dec 2004 16:42:50 -0500
>
>Gnan,
>
>The two basic options are:
>
>1) Hope all browsers visiting your site send the http "REFERER" field.  Not
>all do.
>
>2) Make navigation use forms and submit a hidden parameter holding the URL
>of the page that kicked out the JSP/HTML/form.
>
>Regards,
>David
>
>-----Original Message-----
>From: Shabada, Gnaneshwer [mailto:shabadag@toysrus.com]
>Sent: Friday, December 17, 2004 11:38 AM
>To: 'user@struts.apache.org'
>Subject: Determine the previous action
>
>
>
>Hello,
>How can I determine the previous action I executed in Struts. I would like
>to know which Action/Screen I came from and appropriately do something in 
>my
>application. Is there anyway I could do that?
>
>TIA
>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
>



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


RE: Determine the previous action

Posted by "David G. Friedman" <hu...@ix.netcom.com>.
Gnan,

The two basic options are:

1) Hope all browsers visiting your site send the http "REFERER" field.  Not
all do.

2) Make navigation use forms and submit a hidden parameter holding the URL
of the page that kicked out the JSP/HTML/form.

Regards,
David

-----Original Message-----
From: Shabada, Gnaneshwer [mailto:shabadag@toysrus.com]
Sent: Friday, December 17, 2004 11:38 AM
To: 'user@struts.apache.org'
Subject: Determine the previous action



Hello,
How can I determine the previous action I executed in Struts. I would like
to know which Action/Screen I came from and appropriately do something in my
application. Is there anyway I could do that?

TIA
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