resin 处理 jsp, html 页面乱码问题

## Solution 1:resin安装目录下conf/app-default.xml 文件

<servlet servlet-name="resin-file" servlet-class="com.caucho.servlets.FileServlet">
   <init>
      <character-encoding>utf-8</character-encoding>
   </init>
</servlet>

PS: resin是通过 com.caucho.servlets.FileServlet 来处理静态文件的.

## Solution 2:Put the following in your `web.xml` to achieve the goal.

<jsp-config>
   <jsp-property-group>
      <url-pattern>*.jsp</url-pattern>
      <page-encoding>UTF-8</page-encoding>
   </jsp-property-group>
</jsp-config>

See also:
Unicode – How to get the characters right? – JSP/Servlet response

## Solution 3:Setting character sets in JSPs.

You use the contentType attribute of the page directive to define character sets in JSPs, as the following example shows:

<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>

To use multiple character sets on a single page, use the UTF-8 character set encoding, as the following example shows:

<%@ page contentType="text/html; charset=utf-8" %>