资源文件如下:
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>感觉没有问题啊!!
解决方案 »
- 关于JNDI的问题
- 我用Spring控制Hibernate,但无法自动生成数据库,这是日志,求解!
- myeclipse连接EAServer
- Struts+Spring+Hibernate中文问题?
- 在java程序当中,如何记录一个页面已经下载完毕?
- 拿什么拯救你,我的struts中文显示
- tomcat 5.0连接池,ds为null,高手帮忙看一下
- Middlegen问题,帮帮忙
- 还说十分钟上手,至今hibernate在tomcat上还没配置成功,笨啊
- 请问这个编码问题如何解决呀
- 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>