I don't think there's anything inherently in Struts to do that, however,
it shouldn't be too hard to do on your own... how about this right before
you return your ActionForward from ANY Action:

session.setAttribute("previousPage", mapping.getPath());

That way, assuming everything in your app does go through an Action, which
it generally should, than in any other Action you can get that attribute
and it represents the last Action that executed... you can then return an
appropriate ActionForward to get back to it.

It would probably be a bit nicer to do this in a base Action, but that's
up to you, the theory is the same.

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

On Wed, September 7, 2005 12:22 pm, Tremal Naik said:
> 2005/9/7, Duane Rosengartner <[EMAIL PROTECTED]>:
>> This works very well for me.
>>
>>  <a class="button" href="javascript:history.back()">Back</a>
>
> aehm,probabily I didn't explain well my problem: I don't have to get
> back to the previous page from the actual. Look at this code:
>
> public class DisplayAboutAction extends Action
> {
>     public ActionForward execute(ActionMapping actionMapping,
> ActionForm actionForm,
>             HttpServletRequest httpServletRequest, HttpServletResponse
> httpServletResponse)
>     {
>         // do stuff.....
>         ActionForward af = new ActionForward();
>         af.setPath(previousPagePath);
>         return af;
>     }
> }
>
> I need to get a value for 'previousPagePath'.
>
> I'm trying something like :
>
> <bean:page id="reqq" property="request" />
> <html:link action="next.do" paramId="old_page" paramName="reqq"
> paramProperty="servletPath">
>
> but I'm using Tiles, so what I have as 'old_page' parameter is not the
> action 'previous.do' but '/jsplayout.jsp' instead
>
> thanks,
>
> TREMALNAIK
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to