1、打开struts-cofig .xml文件时提示出现问题
Project 'HelpConstract' is not configured as a MyEclipse Web-Struts Project. Therefore the MyEclipse Struts Editor may not be used with struts-config.xml. The default XML Editor has been used to open the file instead.
解决方法:在项目上点击右键,选择“myeclipe”下的“add struts capabilities”即可解决
2、在Struts中,将中文转化为Unicode,经常用于配置文件中(*.properties)
例如:
ApplicationResources_zh_CN.txt 中的内容
index.heading=欢迎使用地址本!
logon.title=点击这里进入!
要将ApplicationResources_zh_CN.txt 中的中文转为为Unicode并且存储到ApplicationResources_zh_CN .properties文件中
使用native2ascii命令(JDK自带)
C:/> native2ascii -encoding GBK ApplicationResources_zh_CN.txt ApplicationResources_zh_CN .properties
转换后的内容如下:
index.heading=/u6b22/u8fce/u4f7f/u7528/u5730/u5740/u672c!
logon.title=/u70b9/u51fb/u8fd9/u91cc/u8fdb/u5165!