struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "hernan gonzalez" <>
Subject Clean some characters in request parameters
Date Mon, 14 Apr 2008 21:51:19 GMT
Assume I have a lot of html forms with text inputs, and I want to
palce some restrictions for the set of allowed chars. Sort of a sanity
check, at the charset level.
For a concrete example, my storage (db) uses LATIN9 (iso-8859-15), and
the user sometimes can enter the non-allowed acute-accent (instead of
the intended-correct apostrophe). In this -and similar cases- I want
to detect it (replacing it with the "good" character, or throwing an
error). I wish to do it globally, not field by field... though not for
the entire application, but for a set of actions.
I was thinking of an interceptor that operates at the
HttpServletRequest level, before the ParametersInterceptor is applied
(I don't care if the http param corresponds to a String property), but
this does not seem very straightforward , as the HttpServletRequest
does not allow to manipulate the params.
Any suggestion or pointer?


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

View raw message