appfuse1.9x displaytag中文乱码

ant new了一个新工程,部署上去后displaytab出现乱码,解决步骤:

  1. appfuse ant new出来之后的displaytag_zh_CN.properties文件里面中文乱码,从源代码中将该文件替换;
  2. 修改build.xml ,具体看修改后第7、15行。

修改前:

<!-- Copy any resource or configuration files -->
    <target name="copy-resources" depends="prepare"
        description="Copy .properties and .xml files from source directory">
        <copy todir="${build.dir}/web/classes" includeEmptyDirs="no">
            <fileset dir="web/WEB-INF/classes">
                <exclude name="ApplicationResources_zh*.properties"/>
                <include name="*.properties"/>
                <include name="*.xml"/>
                <include name="*.vm"/>
            </fileset>
            <filterset refid="variables.to.replace"/>
        </copy>
        <native2ascii src="web/WEB-INF/classes" dest="${build.dir}/web/classes" 
            includes="ApplicationResources_zh*.properties" encoding="UTF-8"/>
        <generate-database-properties/>
        <copy todir="${build.dir}/web/classes" file="database.properties"/>
    </target>

 修改后:

 

<!-- Copy any resource or configuration files -->
    <target name="copy-resources" depends="prepare"
        description="Copy .properties and .xml files from source directory">
        <copy todir="${build.dir}/web/classes" includeEmptyDirs="no">
            <fileset dir="web/WEB-INF/classes">
                <exclude name="ApplicationResources_zh*.properties"/>
                <exclude name="displaytag_zh_*.properties"/>
                <include name="*.properties"/>
                <include name="*.xml"/>
                <include name="*.vm"/>
            </fileset>
            <filterset refid="variables.to.replace"/>
        </copy>
        <native2ascii src="web/WEB-INF/classes" dest="${build.dir}/web/classes" 
            includes="ApplicationResources_zh*.properties displaytag_zh_*.properties" encoding="UTF-8"/>
        <generate-database-properties/>
        <copy todir="${build.dir}/web/classes" file="database.properties"/>
    </target>

 

 

最后页面正常了



 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值