我部署好书上一个例子,打开浏览器测试的时候,遇到如下异常:
exception
javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
org.apache.jsp.login_jsp._jspService(login_jsp.java:86)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
root cause
javax.servlet.jsp.JspException: Cannot find message resources under key org.apache.struts.action.MESSAGE
org.apache.struts.util.RequestUtils.retrieveMessageResources(RequestUtils.java:1103)
org.apache.struts.util.RequestUtils.message(RequestUtils.java:1043)
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:294)
org.apache.jsp.login_jsp._jspx_meth_bean_message_0(login_jsp.java:101)
org.apache.jsp.login_jsp._jspService(login_jsp.java:72)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
可是我在我的struts程序的/WEB-INF/classes/com/wiley/放了ApplicationResources.properties文件
而且在struts-config.xml里也有:
<message-resources
parameter="com.wiley.ApplicationResources"/>
请问是什么原因??请大家指教
------解决方法--------------------------------------------------------
<message-resources parameter="com/wiley/ApplicationResources"/>
http://www.javayou.com