Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

Re: Filter

Taras Puchko

2007-01-24

Replies:

Hi!

Request parameters should not be confused with request attributes. In
general you cannot set a parameter but you can make a wrapper for the
request object overriding getParameter(String), getParameterNames()
and getParameterValues(String).
You can also forward to a URL that contains your parameter.

Taras.

On 1/24/07, Emmanuel KOJE <e.koje@(protected):
> Hi Guys,
>
> I tried to configure a filter to get all my cookies from my request and set information some information in the request object.
>
> Unfortunetly it seems It didn't keep the value I've set as a parameter of the request. Every time my request pqremeter is empty. Even if I do a setAttribute.
> Can I use custom filter with Struts 2 ? or does the filter RequestDispacther override all my parameters ?
>
> Thanks for your help
>
>
> ----- Original Message ----
> From: Dave Newton <DNewton@(protected)>
> To: Struts Users Mailing List <user@(protected)>
> Sent: Tuesday, January 23, 2007 5:00:29 PM
> Subject: RE: [s2] Question about SessionAware docs.
>
> From: Tom Schneider [mailto:schneidh@(protected)]
> > Actually your explanation is not quite 100% correct. The interceptor
> > injects a Map that is backed by the HttpSession. So puts and gets to
> > the Map will actually be puts and gets to the HttpSession. (Very
> > clever IMO)
>
> Ah, okay. That's handy and still keeps it clean :)
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
>
>
>
>
>
>
> ____________________________________________________________________________________
> Looking for earth-friendly autos?
> Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
> http://autos.yahoo.com/green_center/
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.