if you are using servlet 2.4 and jsp 2.0
you can use the following special config in web.xml:
from http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd and http://java.sun.com/xml/ns/j2ee/jsp_2_0.xsd
<jsp-config>
<jsp-property-group>
<display-name>Setup default encoding</display-name>
<url-pattern>*.jsp</url-pattern>
<page-encoding>ISO8859-1</page-encoding>
</jsp-property-group>
</jsp-config>
Reference article:
http://www.oracle.com/technology/sample_code/tech/java/codesnippet/jsps/jspconfig/jspconfig.html#encode
No comments:
Post a Comment