tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: <?xml version="1.0" encoding="ISO-8859 in web.xml
Date Tue, 24 Jun 2008 12:27:25 GMT

Raghuveer wrote:
> Encoding attribute is used for request and response only or for any other
> purpose?
> To handle Http request and response in utf8 I have added following code in
> my web.xml in JSP application
> 
> <?xml version="1.0" encoding="utf8"
> 
> Is this correct procedure 
> 
In short, no.
It will not hurt, but it has nothing to do with the handling of requests 
and responses.
The "encoding" attribute of the <xml> tag in the various Tomcat 
configuration files, just specifies to the module that parses these 
configuration files, in which character set this configuration file is 
written.  And since encoding="UTF-8" is the default for XML files, what 
you did above basically changes nothing at all.

Now, to answer your real question about UTF-8 request/response handling 
: that is really a very wide question that you are asking, and you 
should probably take this a little bit at a time.

The good news is that Tomcat and Java basically default to 
Unicode/UTF-8, so unless you do things really wrong, it should not be a 
big problem to support UTF-8 requests and responses.

The following previous messages in this forum entitled "UTF-8 handling 
differs between two servlets within the same application", will already 
provide you with some good pointers.

André

---------------------------------------------------------------------
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