You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by xunhong li <li...@yahoo.com> on 2002/12/31 06:54:07 UTC

Can we set the request encoding before populate the params?

 Hi, Can we add a config item to set the request encoding before populate the params? It is not convenient to transform the encoding every time when we work on Chinese or Janpanese platform. I knew newest tomcat support the new servlet API request.setCharacterEncoding().



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

Re: Can we set the request encoding before populate the params?

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Mon, 30 Dec 2002, xunhong li wrote:

> Date: Mon, 30 Dec 2002 21:54:07 -0800 (PST)
> From: xunhong li <li...@yahoo.com>
> Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> To: struts-user@jakarta.apache.org
> Subject: Can we set the request encoding before populate the params?
>
>
>  Hi, Can we add a config item to set the request encoding before
> populate the params? It is not convenient to transform the encoding
> every time when we work on Chinese or Janpanese platform. I knew newest
> tomcat support the new servlet API request.setCharacterEncoding().
>

Unfortunately, adding this method call to the standard Struts code would
make us dependent on Servlet 2.3, while the advertised minimum platform
for running Struts code is still Servlet 2.2.

It would not be tremendously difficult, though, for your application to
subclass RequestProcessor to add this feature.  A convenient place might
be in a custom processPreprocess() method.

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>