appfuse1.9x displaytag中文乱码
- appfuse ant new出来之后的displaytag_zh_CN.properties文件里面中文乱码,从源代码中将该文件替换;
- 修改build.xml 第7、15行:
将原来的
1 <!-- Copy any resource or configuration files --> 2 <target name="copy-resources" depends="prepare" 3 description="Copy .properties and .xml files from source directory"> 4 <copy todir="${build.dir}/web/classes" includeEmptyDirs="no"> 5 <fileset dir="web/WEB-INF/classes"> 6 <exclude name="ApplicationResources_zh*.properties"/> 7 <include name="*.properties"/> 8 <include name="*.xml"/> 9 <include name="*.vm"/> 10 </fileset> 11 <filterset refid="variables.to.replace"/> 12 </copy> 13 <native2ascii src="web/WEB-INF/classes" dest="${build.dir}/web/classes" 14 includes="ApplicationResources_zh*.properties" encoding="UTF-8"/> 15 <generate-database-properties/> 16 <copy todir="${build.dir}/web/classes" file="database.properties"/> 17 </target>
改为
1 <!-- Copy any resource or configuration files --> 2 <target name="copy-resources" depends="prepare" 3 description="Copy .properties and .xml files from source directory"> 4 <copy todir="${build.dir}/web/classes" includeEmptyDirs="no"> 5 <fileset dir="web/WEB-INF/classes"> 6 <exclude name="ApplicationResources_zh*.properties"/> 7 <exclude name="displaytag_zh_*.properties"/> 8 <include name="*.properties"/> 9 <include name="*.xml"/> 10 <include name="*.vm"/> 11 </fileset> 12 <filterset refid="variables.to.replace"/> 13 </copy> 14 <native2ascii src="web/WEB-INF/classes" dest="${build.dir}/web/classes" 15 includes="ApplicationResources_zh*.properties displaytag_zh_*.properties" encoding="UTF-8"/> 16 <generate-database-properties/> 17 <copy todir="${build.dir}/web/classes" file="database.properties"/> 18 </target>
页面正常了