我放在根目录下了,因为我的struts-config.xml中这样配置了:<message-resources null="false" parameter="ApplicationResources" />
解决方案 »
- jquery的ajax方法导致css效果延迟显示的问题
- 求助OA系统实现共享人员表
- 转换word或excel
- 关于java操作word文件的求助
- struts2中怪异问题FileUploadInterceptor拦截器失效。多文件上传中限制文件类型后非常怪异问题。请求高手帮忙解决看看
- Hibernate 棘手问题!希回答
- 紧急求解:我有一512M DDR服务器内存,浪潮服务器的,现在想把它使用在普通的PC上?为何检测不出呢?是不是与我的主板有关系呢?是不是在
- struts的官方帮助文档!!!!!!!!
- 请推荐一本比较好的XML方面的入门书籍
- response是怎样响应客户端的?
- struts使用validator验证Integer类型的发生的问题
- 新来得,听说这里不错,问一个struts的问题(初级)
2004-8-27 16:10:31 org.apache.struts.util.PropertyMessageResources <init>
信息: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
2004-8-27 16:10:31 org.apache.struts.util.PropertyMessageResources <init>
信息: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
2004-8-27 16:10:32 org.apache.struts.util.PropertyMessageResources <init>
信息: Initializing, config='ApplicationResources', returnNull=true为什么服务器一运行就提示这些?
如果换成其他版本,就没有
但我部署在Weblogic下还是一样啊!
Weblogic启动的提示如下:
2004-8-27 17:41:00 org.apache.struts.util.PropertyMessageResources <init>
信息: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
2004-8-27 17:41:00 org.apache.struts.util.PropertyMessageResources <init>
信息: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
2004-8-27 17:41:00 org.apache.struts.util.PropertyMessageResources <init>
信息: Initializing, config='ApplicationResources', returnNull=true
和以前一样!是不是我的Struts有问题啊?我的Struts是1.1的,是JBuilderX自带的。
和ApplicationResources.properties也没有配置上的关系
是你的代码错了
那些提示没有问题
我想我的ActionForm中的validate方法写的没有问题啊,代码如下:
public ActionErrors validate(ActionMapping actionMapping,
HttpServletRequest httpServletRequest) {
ActionErrors errors = new ActionErrors();
if (userId.equals(null) || userId.equals("")) {
errors.add("userId", new ActionError("error.userId.required"));
}
if (password.equals(null) || password.equals("")) {
errors.add("password", new ActionError("error.password.required"));
}
return errors;
}
为什么每次不输入数据,总看不到ApplicationResources.properties中的错误信息,却总显示:
No input attribute for mapping path /loginAction
The server encountered an internal error (No input attribute for mapping path /loginAction) that prevented it from fulfilling this request.
<action path="/processCustomerRegister"
type="seu.yuch.CustomerRegisterAction"
name="customerRegisterForm"
validate="true"
scope="request"
input="/jsp/customerRegister.jsp">
<forward name="success" path="/jsp/registerResult.jsp" />
<forward name="failure" path="/jsp/customerRegister.jsp" />
</action>而且在registerRegister.jsp页面中须有<html:errors />,这样才会显示相应的错误信息。
我的配置项如下:
<action name="loginActionForm" path="/loginAction" scope="request" type="cwx.common.LoginAction" validate="true" input="/login.jsp">
<forward name="success" path="/main.jsp" />
</action>
编译运行:http://localhost:8080/StrutsModule/loginAction.do
当我什么都不输入提交,无任何反应,而URL变成了:
http://localhost:8080/StrutsModule/loginAction.do;jsessionid=6D4187A9923CA7A323D8B0A7BB84913A
<logic:messagesPresent>
<ul>
<html:messages id="error">
<li>
<bean:write name="error"/>
</li>
</html:messages>
</ul>
</logic:messagesPresent>
Message:
Internal Server Error
Description:
The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
Exception:
javax.servlet.ServletException: Cannot find bean error in any scope
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:471)
at org.apache.jsp.login$jsp._jspService(login$jsp.java:390)
......
Root:
cause javax.servlet.jsp.JspException: Cannot find bean error in any scope
at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:938)
at org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:286)
at org.apache.jsp.login$jsp._jspService(login$jsp.java:156)
......
<init-param>
<param-name>application</param-name>
<param-value>xxx.util.ApplicationResources_zh_CN</param-value>
</init-param>
再有就是一般要把ApplicationResources.properties另放目录