struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "hernan gonzalez" <hgonza...@gmail.com>
Subject Re: Clean some characters in request parameters
Date Tue, 15 Apr 2008 20:25:43 GMT
>  There's nothing in Struts that will take care of this directly. Ideally
> your users should be able to enter whatever characters they want; I would be
> looking at how to get the database layer to cooperate, instead of imposing
> arbitrary input restrictions based on the current database configuration.
> That said, here are some ideas to consider that might help get this done:
>
>  - to simply validate input and reject any that is outside the target
> character set, you could implement a custom validator;
>
>  - to transliterate the input (performing character conversions to force the
> input into the target character set), you could implement a custom converter
>
>  - to apply either strategy to *all* inputs for a particular action or set
> of actions, you would want to use an interceptor. I would guess you'd need
> to call actionInvocation.getActionContext().setParameters() with your
> 'manipulated' request parameter data.
>

Good answer. Thanks.

HernĂ¡n

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message