Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Help, Why I have:javax.servlet.jsp.JspException: Cannot find message resour

843836Jan 23 2004 — edited Jul 29 2007
All,


I run index.jsp on Apache Rersin with Struts framework and I got following error message once I use tag "bean:message":

500 Servlet Exception
javax.servlet.jsp.JspException: Cannot find message resources under key
org.apache.struts.action.MESSAGE
at org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java:1239)
at org.apache.struts.taglib.TagUtils.message(TagUtils.java:1094)
at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:267)
at mmstruts.index__jsp._jspService(/mmstruts/index.jsp:16)
....


I copy all related codes here and can any pro review these and give me a hint?

1) web.xml (under /WEB-INF/):

<web-app>
<!-- Standard Action Servlet Configuration (with debugging) -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>
org.apache.struts.action.ActionServlet
</servlet-class>
<init-param>
<param-name>application</param-name>
<param-value>ApplicationResources</param-value>
</init-param>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
................



2) ApplicationResources.properties (unde /WEB-INF/classes/):

index.title=Struts Evaluation for MM -- (index.title)
index.mmtext = This is my Struts application testing-- (index.text1)



3) index.jsp (under /mmstruts/) where mmstruts is same level as WEB-INF:


<%@ page language="java" %>

<%@ taglib uri="../WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="../WEB-INF/tlds/struts-html.tld" prefix="html" %>
<%@ taglib uri="../WEB-INF/tlds/struts-logic.tld" prefix="logic" %>

<html:html locale="true">
<head>
<title><bean:message key="index.title" /></title>
<html:base/>
</head>
<body>
<bean:message key="index.mmtext" />
</body>
</html:html>

Thank you very mcuh
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 26 2007
Added on Jan 23 2004
11 comments
839 views