If I need to set the same encoding for all applications deployed in a tomcat instance, I can edit server.xml and add a section like this:
<Connector port="8081" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443"
URIEncoding="UTF-8"/>
Is there a way to specify encoding for a certain application? (maybe in its web.xml or somewhere else)?
As far as I know web.xml does not allow what you want, so I’d suggest the following ways.
<%@page pageEncoding="UTF-8" %>)