You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Francesco Di Candia <fr...@infopubblica.com> on 2003/12/18 11:33:07 UTC
Re: Cannot find message resources under key org.apache.struts.action.MESSAGE
Hi, i've in my strut-config.xml this line
<message-resources parameter="ApplicationResources"/>
instead of your
<init-param>
<param-name>application</param-name>
<param-value>ApplicationResources</param-value>
</init-param>
and it works fine.
Francesco
----- Original Message -----
From: Derek Colley
To: 'struts-user@jakarta.apache.org'
Sent: Thursday, December 18, 2003 10:29 AM
Subject: RE: Cannot find message resources under key org.apache.struts.action.MESSAGE
Hello,
I have been trying to get Tomcat5 and Struts1.1 to play nice...
I have the following config in web.xml:
<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>
...
</servlet>
I have a file called
${basedir}/web/WEB-INF/classes/ApplicationResources.properties with the
following contents:
prompt.welcome=Welcome
There are no errors when I do "ant install"...
Yet, when I try calling <bean:message key="prompt.welcome" /> I get the
following error:
javax.servlet.ServletException: Cannot find message resources under key
org.apache.struts.action.MESSAGE
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI
mpl.java:867)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:800)
org.apache.jsp.index_jsp._jspService(index_jsp.java:87)
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:3
11)
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)
Can anyone please shed some light on this?
Many thanks,
Derek