Tapestry乱码问题~

在windows下:不用.application也可以使用正常,无乱码
在unix下面:需要配置: 工程名.application,工程名和web.xml中定义的一致。
比如你定义:address.application 内容是:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC
  "-//Apache Software Foundation//Tapestry Specification 3.0//EN"
  "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
<application name=" ADDRESS" engine-class="com.eshore.buddy.business.address.web.MyEngine">
    <description>
        <![CDATA[ address project  ]]>
    </description>
    <property name="org.apache.tapestry.template-encoding" value="GBK"/>
    <property name="org.apache.tapestry.output-encoding" value="UTF-8"/>
   
</application>
那么web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <servlet>
        <servlet-name> address</servlet-name>
        <servlet-class>
            org.apache.tapestry.ApplicationServlet
        </servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name> address</servlet-name>
        <url-pattern>/app</url-pattern>
    </servlet-mapping>
</web-app>

你可能感兴趣的:(Tapestry乱码问题~)