这个问题用struts是没办法解决的。他读去资源文件是有自己的一套顺序,程序无法控制。
解决方案 »
- com.opensymphony.xwork2.util.logging.LoggerFactory
- 高分跪求java的 tftp 服务器和 客户端的 代码
- spring bean 调用问题
- ssh部署于Tomcat启动时出现action: null的问题
- 一个简单的jsp+javabean问题
- 如何配置tomcat5.0中的数据源问题??
- 求vrml+java的实例,谢谢!
- 使用EJB3.O简化EJB开发(翻译)提意见指出错误就有分
- 惊喜:刚发现的免费在线电影站,只要注册一下就可以看!速度超快,清晰度高,最新大片竟然都有。没有病毒!放心打开看吧!网址:http://w
- jbuder7中使用CMP2.0的问题
- j2ee都包含那些技术,怎么进行系统的学习?诚求!
- hibernate问题
hello.jsp.title=xxxxxxxxxxx
hello.jsp.page.heading=xxxxxxxxxxxxxxxx# Project role
hello.errors=xxxxxxxxxxxxxxxx
hello.errors.xxxx=xxxxxxxxxxxxxx
hello.jsp.page.heading=xxxxxxxxxxxxxxxx# Project role
hello.errors=xxxxxxxxxxxxxxxx
hello.errors.xxxx=xxxxxxxxxxxxxx
//load the resource bundle
ResourceBundle bundle=ResourceBundle.getBundle("com.yourcompany.struts.application");
用一下代码来设置读取资源文件的那个key
//get the message template
String temp=bundle.getString("login.jsp.label.password");
欢迎高手加入!!!!!!!!!!!!!QQ群: 唯爱J2EE(联盟):20390984(招人) 唯爱J2EE(java开发):14402276(人员已满)
唯爱J2EE(WEB):33308970(人员已满)
********************不要重复加入,谢谢**************************
此群只加J2EE方面的人才与高手...或搞JAVA 一年以上的.....其他人不加........加群时,,注明:J2EE方面的技术体系,,,如:Struts,Spring,Hibenate,EJB,JSF,Ajax,Oracle,Weblogic等有关技术,方能通过....
<message-resources parameter="com.yourcompany.struts.ApplicationResources_zh_CN" />
<message-resources key="messageValidator" parameter="com.yourcompany.struts.ApplicationValidator" />在jsp中如果要显示com.yourcompany.struts.ApplicationValidator包的资源文件,该这样写:
<bean:message key="error" bundle="messageValidator">
这样将输出com.yourcompany.struts.ApplicationValidator这个资源文件中error定义的消息文本.
希望大家共同学习.....
ㄒо:J2EE盟友,群论坛地址:http://www.NetJava.org 欢迎高手加入!!!!!!!!!!!!!
QQ群: 唯爱J2EE(联盟):20390984(招人) 唯爱J2EE(java开发):14402276(人员已满)
唯爱J2EE(WEB):33308970(人员已满)
********************不要重复加入,谢谢**************************
此群只加J2EE方面的人才与高手...或搞JAVA 一年以上的.....其他人不加........加群时,,注明:J2EE方面的技术体系,,,如:Struts,Spring,Hibenate,EJB,JSF,Ajax,Oracle,Weblogic等有关技术,方能通过....
不过你们说的方法都没用,可能我没说清楚。
<formset>
<form name="/manager/addOrupdate">
<field property="managername" depends="required">
<arg0 key="manager.name"/>
</field>
</form>
</formset>看到 <arg0 key="manager.name"/>了吧!这个key就是引用资源文件的,但是无法指定资源文件,我想问的就是“怎么让他引用指定的资源文件”。不用我说大家都知道这段话是哪里的吧!
<message-resources parameter="com.yourcompany.struts.ApplicationResources_zh_CN" />
<message-resources key="messageValidator" parameter="com.yourcompany.struts.ApplicationValidator" />
<arg0 key="manager.name" bundle="messageValidator"/>