struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton" <niall.pember...@blueyonder.co.uk>
Subject Re: Re[2]: Forward from tile
Date Sat, 12 Jun 2004 17:00:58 GMT
I was thinking more of storing the actual url in the session which is what I
meant be "href" rather than the forward. If you're using a Servlet 2.3
container or above you can use the getRequestURL() method in the Request to
get the url - it doesn't return any query string though but there is also a
getQueryString() method in the Request.

If you want to do it this way theres an empty processPreprocess(request,
response) method in the RequestProcessor where you could do this.

I'm guessing that you opted for storing a global forward, becuase once you
have changed the language you can then just forward from the action to the
original one. Doing it my way you would need to create a new forward in your
action and set the path to the one stored in the session and then return
that.

Niall


----- Original Message ----- 
From: "Pavlikus" <pavlikus@bk.ru>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Saturday, June 12, 2004 5:30 PM
Subject: Re[2]: Forward from tile


> Thank you Niall. It works!
> I extend TilesRequestProcessor class and overload processForwardConfig
> method. There I put forward.getName() value in session.
>
> It works but I have a little questions on this subj.
> To use such feature I need to declare almost of my forward as global
> forwards. Is it normal?
>
> You wrote 'Store the href...' what exactly href? And to how redirect to
> this 'href' from my action?
>
> I'm new for struts, so thanks for your patience :)
>
>
> NP> Store the href to the previous page in the users session for every
request -
> NP> either customise the RequestProcessor to do this or have a
"BaseAction"
> NP> which all your actions inherit from which does it.
>
> NP> Niall
>
>
>
> >> Hi. My 'header' tile contains the banner and drop-down box for language
> NP> choose.
> >> This header tile included on each page of site.
> >> I use tile-controller class to prepare languages list and Action for
setup
> >> desired language in session:
> >>
> >> How can I return on previous page when user change language?
> >> And have not any nice ides to determine from what
> >> page(tile-definition) user arrived.
>
>
> ---------------------------------------------------------------------
> 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