struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Don Brown" <donald.br...@gmail.com>
Subject Re: How do I get the original RequestURI?
Date Sun, 10 Sep 2006 15:09:59 GMT
Well, first of all, action chaing is bad ;), but second, Struts 1.3 at
least, and perhaps 1.2 automatically saves the original request uri
for you.  Look in the request under the
o.a.struts.Globals.ORIGINAL_REQUEST_URI key.

Don

On 9/10/06, David Grundberg <c04dgg@cs.umu.se> wrote:
> You are absolutely right about that, I could modify PlaceAction to save
> the URL somewhere. But you see, I'm doing a lot of forwarding to the
> ListAction, and I don't want to change every Action that forwards to
> ListAction. Come on! There's got to be a way to find the original URL.
>
> Adam J Samere skrev:
> > You could call getRequestURI in PlaceAction and set the result into a
> > request attribute (assuming PlaceAction forwards to list.do, not a
> > redirect) which would then be available to ListAction. If you are
> > redirecting you would need to either set the value into the session,
> > or append it as a request parameter to list.do. Not sure if there is a
> > better way though.
> >
> > Adam
> >
> > David Grundberg wrote:
> >> Hi,
> >>
> >> I want to do something like this:
> >> 1. User enters http://localhost/appname/welcome.do
> >> 2. PlaceAction forwards to list.do
> >> 3. In ListAction, I want to retrieve the URL the user entered
> >> "/appname/welcome.do".
> >>
> >> The problem: when I run getRequestURI in the ListAction, all I get is
> >> "/appname/list.do". I guess this is a sort of natural thing for it to
> >> do, but how do I get the original URI? (/appname/welcome.do)
> >>
> >> Any help appreciated!
> >>
> >> ---------------------------------------------------------------------
> >> 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


Mime
View raw message