Web application developers often use UTF-8 as the encoding in their applications, but fail to change the server defaults. This applies to anything which uses Servlets (including JSP, and JSF). You can change the defaults in the sun-web.xml, or glassfish-web.xml as shown below by setting the parameter-encoding element. This remove a number of default encoding warnings like this:
WARNING: WEB0500: default-locale attribute of locale-charset-info element is being ignored WARNING: PWC4011: Unable to set request character encoding to UTF-8 from context /, because request parameters have already been read, or ServletRequest.getReader() has already been called.
2 comments :
Thanks great
Funciona, muchas gracias, a sido de gran utilidad.
Post a Comment