tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: UTF-8 handling differs between two servlets within the same application
Date Mon, 23 Jun 2008 15:37:03 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Youssef,

Youssef Mohammed wrote:
| I don't think you need to encode again in the reset or validation. I
am not
| quite sure if calling setCharacterEncoding twice would be the problem
here.
| but just try to remove the redundant ones.

At best, calling setCharacterEncoding after parameters have been read
does nothing. At worst, it will throw an IllegalStateException (which
would be better, IMO).

|> Is it possible, that this character encoding filter is called too late,
|> i.e. when the submitted request parameters are already processed?
|
| Not sure, but if you have other filters they might process the request
| before your encoding filter.

Absolutely. If another filter before your utf8 filter calls anything
like request.getParameter, then the parameters will be read using the
current encoding.

You should make sure that your filter is the first one to run in the chain.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhfwx8ACgkQ9CaO5/Lv0PCTHwCffZtngxoYN+xlPDJEos/eNBYc
AJYAnAj8q8Qs/t9TNsBjxyc09zIsNfZx
=Qe0B
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message