You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Wim Fournier <wi...@geeks.nl> on 2002/01/15 12:44:42 UTC
my first struts - cant find message resources
Hi all,
Sorry to bug you with this newbie questions, but hey.. we all gonna learn some time ;o)
I'm building a sample application to teach myself struts / EJB. I'm working with JBoss and have installed the CD example EJB.
As I'm developping the struts frontend war I bump into 2 problems (sofar)
1) on loading my jsp file i get the following:
javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE
I've got the following in my web.xml:
<servlet-name>action</servlet-name>
<servlet-class>nl.kern.j2ee.sample.struts.ListCDAction</servlet-class>
<init-param>
<param-name>application</param-name>
<param-value>nl.kern.j2ee.sample.struts.ApplicationResources</param-value>
</init-param>
and my ApplicationResources.properties is in:
WEB-INF/classes/nl/kern/j2ee/sample/struts/ApplicationResources.properties
whats wrong here?
2) on deployement I get the following:
[ERROR,EmbeddedCatalinaServiceSX] StandardContext[/cdexample]: Servlet /cdexample threw load() exception
javax.servlet.ServletException: Class nl.kern.j2ee.sample.struts.ListCDAction is not a Servlet
While my ListCDAction extend Action and has the same imports as the struts examples RegistrationAction.java has. It also has a perform method.
anyone who could help me out here?
grtz
Wim Fournier
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: my first struts - cant find message resources
Posted by "David M. Karr" <dm...@earthlink.net>.
>>>>> "Wim" == Wim Fournier <wi...@geeks.nl> writes:
Wim> Hi all,
Wim> Sorry to bug you with this newbie questions, but hey.. we all gonna learn some time ;o)
Wim> I'm building a sample application to teach myself struts / EJB. I'm working with JBoss and have installed the CD example EJB.
Wim> As I'm developping the struts frontend war I bump into 2 problems (sofar)
Wim> 1) on loading my jsp file i get the following:
Wim> javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE
Wim> I've got the following in my web.xml:
Wim> <servlet-name>action</servlet-name>
Wim> <servlet-class>nl.kern.j2ee.sample.struts.ListCDAction</servlet-class>
Wim> <init-param>
Wim> <param-name>application</param-name>
Wim> <param-value>nl.kern.j2ee.sample.struts.ApplicationResources</param-value>
Wim> </init-param>
Wim> and my ApplicationResources.properties is in:
Wim> WEB-INF/classes/nl/kern/j2ee/sample/struts/ApplicationResources.properties
Wim> whats wrong here?
Wim> 2) on deployement I get the following:
Wim> [ERROR,EmbeddedCatalinaServiceSX] StandardContext[/cdexample]: Servlet /cdexample threw load() exception
Wim> javax.servlet.ServletException: Class nl.kern.j2ee.sample.struts.ListCDAction is not a Servlet
Wim> While my ListCDAction extend Action and has the same imports as the struts examples RegistrationAction.java has. It also has a perform method.
Instead of your "ListCDAction" class, your "action" servlet needs to be the
following (unless you've subclassed it):
org.apache.struts.action.ActionServlet
--
===================================================================
David M. Karr ; Best Consulting
dmkarr@earthlink.net ; Java/Unix/XML/C++/X ; BrainBench CJ12P (#12004)
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>