wood burning stoves*
The moose likes Struts and the fly likes Can not find message resources under key org apache struts action MESSAGE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Can not find message resources under key org apache struts action MESSAGE" Watch "Can not find message resources under key org apache struts action MESSAGE" New topic

Can not find message resources under key org apache struts action MESSAGE

Jun Chen

Joined: Feb 23, 2004
Posts: 9
Hi! all,
I am trying run one of my first few Struts framework applications. I got the following error. Can somebody help me out?
<Mar 1, 2004 4:41:08 PM EST> <Error> <HTTP> <101017> <[ServletContext(id=2227270
,name=FirstStrutsApp,context-path=/FirstStrutsApp)] Root cause of ServletExcepti
javax.servlet.jsp.JspException: Cannot find message resources under key org.apache.struts.action.MESSAGE
at org.apache.struts.util.RequestUtils.retrieveMessageResources(RequestU
at org.apache.struts.util.RequestUtils.message(RequestUtils.java:1043)
at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:2
at jsp_servlet.__index._jspService(__index.java:125)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServic
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
Following is my web.xml and struts-config.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
<!-- Action Servlet Configuration -->

<!-- Action Servlet Mapping -->

<!-- Session Timeout Information -->

<!-- The Welcome File List -->
<!-- Application Tag Library Descriptor -->
<!-- Struts Tag Library Descriptors -->


<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
This is the Struts configuration file for the example application,
using the proposed new syntax.
NOTE: You would only flesh out the details in the "form-bean"
declarations if you had a generator tool that used them to create
the corresponding Java classes for you. Otherwise, you would
need only the "form-bean" element itself, with the corresponding
"name" and "type" attributes.

<form-bean name="bookForm" type="com.bmw.trs.example.Book"/>

<forward name="bookCreated" path="/BookView.jsp"/>

<!-- Edit user registration -->
<action path="/createBook"
Thank you in advance!
lee anthony
Ranch Hand

Joined: Jan 23, 2004
Posts: 35
i beleive it is becaz of web.xml might not be pointing to the right
resorce property , do check might help u
what i suggest is remove the resource file from the current file , then check the same flow if the error still persists then i am right by making the first statemet
David Yutzy
tumbleweed and gunslinger
Ranch Hand

Joined: Jun 29, 2001
Posts: 192
You could also place resource references in the Struts-config.xml. This is where I place all of mine. Doing so means you can then use the "bundle" attribute for the bean:message tag for multiple bundles. Leaving out the "bundle" tag uses the default.
This also keeps my web.xml more generic allowing me to customize between projects using mainly the struts-config.xml file.
Jun Chen

Joined: Feb 23, 2004
Posts: 9
Guess what? I missed a '/' char in the <action> </action> tag.
Thank you anyway.
I agree. Here's the link: http://aspose.com/file-tools
subject: Can not find message resources under key org apache struts action MESSAGE