struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Hamacher <>
Subject Re: html:rewrite with params
Date Mon, 14 Nov 2005 09:36:22 GMT
Okay - here are some more details:

Let's say I have the following URL: http://somehost/showEntry?entryID=343
I have multilanguage support in my application, so let´s assume, that I click 
on the language-button and therefor call the page /, which 
changes my Locale. The switchLanguage uses the last ActionForward to link 
back to the refering page (showEntry). But the problem is, that it doesn't 
have the param "entryID" anymore. So the page shows an empty page. As I don't 
want to add this parameter in my session-, but in the request scope I have to 
remember this param somehow. So I thought if there might be a way to save 
this to the ActionForward, because there is no request.setParameter()-Method 
anywhere. And I have been told that the reques.getHeader("referer")-solution 
is pretty unsafe, because of proxies and firewalls. So I wonder what would be 
the best way, as I think refering back to one page and mulit-language-support 
should be one of the standard-issues on modern webapplication.

I hope that helps a little..


On Thursday 10 November 2005 22:31, Laurie Harper wrote:
> Thomas Hamacher wrote:
> > But anyways: does anybody know, if the parameters, given through paramId
> > are saved in an ActionForward? This would help me a lot, because I have
> > to remember the parameters - if any are used - together with my
> > ActionForward for later references. Right know I'm trying a workaround
> > with my own RequestProcessor, which tries to cut out the parameters and
> > save it somewhere and add it later to the ActionForward, but that doesn't
> > work that well.
> I'm not quite sure what you're trying to do. The parameters you specify
> through paramId are request parameters to include in the URL. They're
> available in your action through your form bean or from
> request.getParameter().
> An ActionForward is what your action returns to tell Struts where to
> forward control to after the request has been processed. So the
> parameters you setup when you construct the URL don't have anything to
> do it.
> Perhaps you can explain what you are trying to achieve by saving the
> parameters?
> L.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message