资源文件传参数(转码)

log.jsp 

用到资源文件,传参数:用中文
  <html:form action="/login">
   <bean:message key="info.input" arg0="帐号" bundle="CH"/><html:text property="account"/><html:errors property="account"/><br/>
   <bean:message key="info.input" arg0="密码" bundle="CH"/><html:password property="password"/><html:errors property="password"/><br/>
   <html:submit/><html:cancel/>
  </html:form>

temp.properties 资源配置文件

# 资源文件.格式:key=value     #是注释

#native2ascii -encoding gb2312 源文件名,目标文件名
#用资源文件传参数,参数从{0}.....{4}
info.input=<font color=red>请你输入 {0}:</font>

struts-config.xml配置文件

<!-- 定义其它资源文件 特意指定资源文件key -->
  <message-resources key="CH"  parameter="prj7_1.ApplicationCHResources"/>

 

1.配置path:

添加native2ascii当前的路径,注意在java >jdk1.5>bin下面

2.cmd

3.切换目录 cd   /c   d:

4.cd /d   native2ascii的目录

5.在native2ascii的目录下

 

native2ascii  –encoding  gb2312  源文件名(temp.propertiy),目标文件名

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值