We have many web applications running on Tomcat, and we choose UTF-8
character encoding for each web application, so we must add a
SetCharacterEncoding filter for each web application to make sure the data
POSTed from a FORM can be processed correctly.

As I know, Tomcat has a server.xml config file, and the HTTP connector and
AJP connector configurations have a URIEncoding parameter which will affect
the URL/URI data. The URIEncoding parameter is very good for us, because we
have Chinese characters in the URL/URI, we do not need to encode the URL
which contains Chinese characters into the form like "%E6%B5%8B%E8%AF%95" ,
and the plain Chinese characters will make the client user known where he is
clearly. But, URIEncoding parameter only affect the GET method,  it does not
affect the POST method.

Although we can add a SetCharacterEncoding filter for each web application,
we still wish Tomcat can add a server level configuration item which just
like the URIEncoding parameter and it can let us choose the default
character/charset encoding for POST method. This is because of the following
reasons:
1. Repeated configuration is too bored: If Tomcat supplied that feature, we
can delete the same config from each web.xml. and we can even delete the
web.xml for some simple web applications.
2. We afraid the efficiency of character encoding conversion: The data
POSTed from FORM are already x-www-form-urlencoded, if these data can be
converted directly into UTF-8 instead of internal character encoding of
Tomcat (is it iso-8859-1 ?), then it may be more efficient i think.

-- 
View this message in context: 
http://www.nabble.com/Feature-request%3A-Server-level-character-encoding-instead-adding-a-filter-for-each-web-application.-tf2811984.html#a7847027
Sent from the Tomcat - User mailing list archive at Nabble.com.


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

Reply via email to