Can not set Character Encoding using sun-web.xml

Posted by stck777 on Stack Overflow See other posts from Stack Overflow or by stck777
Published on 2010-03-18T20:10:10Z Indexed on 2010/03/18 20:11 UTC
Read the original article Hit count: 352

Filed under:
|
|

I am trying to send special characters like spanish chars from my page to a JSP page as a form parameter. When I try get the parameter which I sent, it shows that as "?" (Question mark). After searching on java.net thread I came to know that I should have following entry in my sun-web.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Servlet 2.4//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_4-0.dtd">
<sun-web-app>
<locale-charset-info default-locale="es">
<locale-charset-map locale="es" charset="UTF-8"/>
<parameter-encoding default-charset="UTF-8"/>
</locale-charset-info>
</sun-web-app>

But it did not work with this approach still the character goes as "?".

© Stack Overflow or respective owner

Related posts about java

Related posts about jsp