-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Riffla,

riffla wrote:
> Here's the content of the filter class:

[snip]

>       public void doFilter(ServletRequest request, ServletResponse response,
> FilterChain chain)
>                       throws IOException, ServletException {
> 
>               request.setCharacterEncoding("UTF-8");
>               log.debug(this.getClass().getName() + ": Setting request to " +
> request.getCharacterEncoding());
>               chain.doFilter(request, response);
>       }

I don't believe this is correct. You should only be overriding the
request's encoding when none is provided. Try something like this:

public void doFilter(ServletRequest request,
                     ServletResponse response,
                     FilterChain chain)
    throws IOException, ServletException
{
    if(null == request.getCharacterEncoding())
    {
        request.setCharacterEncoding("UTF-8");
        log.debug(this.getClass().getName() + ": Set request to "
                  + request.getCharacterEncoding());

        chain.doFilter(request, response);
    }
}

If you are overriding the browser's character encoding, then you are
making a mistake. Also note that this is only setting the character
encoding for the request /body/, not for the URL being requested.

If your POST requests are failing, the problem might be fixed with the
above code. If GET requests are failing, then the problem is elsewhere.

- -chris

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

iD8DBQFGBTLs9CaO5/Lv0PARAic0AKChoeCPSl8fcLZjY5S3E/ZYsPJKWQCfX2Kw
i8kt/TNqSc2VE158d8cLYo0=
=R3iH
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to