You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Vladislav Kamensky <Vl...@atbusiness.com> on 2003/03/21 15:18:38 UTC
refresh command
Is it possible to create Action that will have "forward" which is not specified by
struts-config.xml. I know that I can create Action that will create its own "forward"
on the basis of HttpRequest parameter, for example, but I need a bit different thing.
My Action is to be invoked from lots of pages and it should redirect
control flow to the page from which it was called. So, I need a kind of refresh action.
I can't figure out requested page by calling HttpRequest.getRequestURI() method
because my Control is used as a "Tile" (after RequestDispatcher's include() has been
invoked requestURI has value which is not equal to the initial one).
All what I need is to know the "forward" which was used by the system last time.
Having known that I will be able to redirect my Action to the View which was shown
when my Action was invoked.
Is it possible to get "forward" history list ?
Any ideas of how it can be resolved ?
Any suggestions are welcome.
--
Vlad Kamensky,
@Business SPb.
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: refresh command
Posted by Dan Allen <da...@mojavelinux.com>.
Vladislav Kamensky (Vladislav.Kamensky@atbusiness.com) wrote:
> Is it possible to create Action that will have "forward" which is not specified by
> struts-config.xml. I know that I can create Action that will create its own "forward"
> on the basis of HttpRequest parameter, for example, but I need a bit different thing.
>
> My Action is to be invoked from lots of pages and it should redirect
> control flow to the page from which it was called. So, I need a kind of refresh action.
> I can't figure out requested page by calling HttpRequest.getRequestURI() method
> because my Control is used as a "Tile" (after RequestDispatcher's include() has been
> invoked requestURI has value which is not equal to the initial one).
>
> All what I need is to know the "forward" which was used by the system last time.
> Having known that I will be able to redirect my Action to the View which was shown
> when my Action was invoked.
>
> Is it possible to get "forward" history list ?
> Any ideas of how it can be resolved ?
> Any suggestions are welcome.
Search the list for how to prevent tiles from changing the
requestURI. You have to basically intialize the tiles context
inside your action.
Dan
--
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Daniel Allen, <da...@mojavelinux.com>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"I used to herd dairy cows. Now I herd linux users. Apart
from the isolation, I think I preferred the cows. They were
better in conversation, easier to milk, and if they annoyed me
enough, I could shoot them and eat them."
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org