国际化中文乱码
时间:2008-10-14 来源:fly928sky
1.用JDK的native2ascii工具对资源文件进行转换
2.使用ResourceBundle Editor插件
需要使用<bean:message />标签,修改如下形式:
<html:form action="/login">
<bean:message key="login.username"/>: <html:text property="username"/><html:errors property="username"/><br/>
<bean:message key="login.password"/>: <html:password property="password"/><html:errors property="password"/><br/>
<input type="submit" value=<bean:message key="login.submit" />>
<input type="reset" value=<bean:message key="login.cancel" />>
</html:form>
2.使用ResourceBundle Editor插件
需要使用<bean:message />标签,修改如下形式:
<html:form action="/login">
<bean:message key="login.username"/>: <html:text property="username"/><html:errors property="username"/><br/>
<bean:message key="login.password"/>: <html:password property="password"/><html:errors property="password"/><br/>
<input type="submit" value=<bean:message key="login.submit" />>
<input type="reset" value=<bean:message key="login.cancel" />>
</html:form>
相关阅读 更多 +