tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Herrmann <>
Subject [5.0] [PATCH] I18N, CharsetMapper, DeploymentDescriptor
Date Thu, 08 Aug 2002 21:43:24 GMT

In the Servlet 2.4 spec section 5.4 on i18n, the deployment descriptor
gets new stuff for mapping locale to character encoding. The spec says,

[Servlet 2.4, Section 5.4] "[...] The setLocale method also sets charset
component in Content-Type with an encoding information which can be
obtained from the locale-encoding-mapping element in the deployment
descriptor, if present. For example, to map a locale to the specific
encoding, the syntax of locale-encoding-mapping would be:


To implement this, I did this,

1. I added some lines to the digester to push the local and encoding
info into the Context 

2. I changed the Context to push the mapping into the CharsetMapper

3. Changed the CharsetMapper class so it can accept new mappings 

4. changed CoyoteResponse.setLocale() so it consults CharsetMapper and
sets the mapped encoding

What do people think? (I used some long method names on Context and
CharsetMapper to make it clear that the information is coming from the
Deployment Descriptor.)  Can someone review and patch this?


View raw message