资源文件如下:
welcome.title = Struts Logon Example Application
welcome.heading = Welcome!
welcome.message = To get started on your own application,copy the struts-blank.war to a new WAR file using the name for your
application.Place it in your container's "webapp" folder (or equivalent),and let your container auto-deploy the application Edit
skeleton configuration files as needed,reload Struts or restart your container,and you are on your way!(You can find
application.properties file with this message in the <B>/WEB-INF/src/java/resources</B> folder.)
errors.footer = </UL><HR>
errors.header = <H3><FONT color="red">Validation Error</FONT></H3>You must correct the following error(3) before
proceeding:<UL>
error.username.required = <LI>Username is required</LI>
error.password.required = <LI>Password is required</LI>
error.logon.invalid = <LI>Username and password provided not found inuser directory.Password must match exactly,including;
lower or upper case characters.</LI>
error.logon.connect = <LI>Could not connect to user directory.</LI>感觉没有问题啊!!
welcome.title = Struts Logon Example Application
welcome.heading = Welcome!
welcome.message = To get started on your own application,copy the struts-blank.war to a new WAR file using the name for your
application.Place it in your container's "webapp" folder (or equivalent),and let your container auto-deploy the application Edit
skeleton configuration files as needed,reload Struts or restart your container,and you are on your way!(You can find
application.properties file with this message in the <B>/WEB-INF/src/java/resources</B> folder.)
errors.footer = </UL><HR>
errors.header = <H3><FONT color="red">Validation Error</FONT></H3>You must correct the following error(3) before
proceeding:<UL>
error.username.required = <LI>Username is required</LI>
error.password.required = <LI>Password is required</LI>
error.logon.invalid = <LI>Username and password provided not found inuser directory.Password must match exactly,including;
lower or upper case characters.</LI>
error.logon.connect = <LI>Could not connect to user directory.</LI>感觉没有问题啊!!
解决方案 »
- java异常处理传递问题
- 关于jsp out对象print方法!
- 急急急!!! java --- inputstream 转换为 base64
- 学习J2EE的步骤,求大神指教
- hello world with hibernate
- struts2 上传文件问题 就大神解答
- 逻辑正确 编译错误
- 求tuxedo6.5 的java 连接 解决方案?
- 关于EJB事务的一个问题,如果回答对了,追加分(万分紧急)
- web项目放到weblogic中 显示乱码
- Cannot find message resources under key org.apache.struts.action.MESSAGE的问题
- 有关Velocity的问题
如果你的资源文件名为:ApplicationResources.properties
在struts-config.xml中配置如下:
<struts-config>
.....
<message-resources parameter="ApplicationResources" />
</struts-config>
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
<web-app>
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>ApplicationResources</param-name>
<param-value>com.youcompany.struts.ApplicationResources</param-value>
</init-param>
<init-param>
<param-name>coinfig</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>2</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<taglib>
<taglib-uri>/tags/struts-html</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
</web-app>这里的<init-param>
<param-name>ApplicationResources</param-name>
<param-value>com.youcompany.struts.ApplicationResources</param-value>
</init-param>
不是在指定资源文件吗?而且我用的eclipse的easystruts不允许更改ApplicationResources!!
我有很多很糊涂的,还忘东东赐教,加我MSN:[email protected]
<param-name>application</param-name><!--here should be application-->
<param-value>com.youcompany.struts.ApplicationResources</param-value>
</init-param>