struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anderson, Jessica" <Jessica.Ander...@trs.state.tx.us>
Subject RE: newbie question
Date Wed, 14 Mar 2001 16:05:13 GMT
>From the User Guide:

-------------------

When you configue the controller servlet in the web application deployment
descriptor, one of the things you will need to define in an initialization
parameter is the base name of the resource bundle for the application. In
the case described above, it would be com.mycompany.mypackage.MyResources.

<servlet> 

<servlet-name>action</servlet-name>

<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>

<init-param>

<param-name>application</param-name>

<param-value>com.mycompany.mypackage.MyResources</param-value>

</init-param>

<.../>

</servlet>

The important thing is for the resource bundle to be found on the class path
for your application.

-----Original Message-----
From: Jesse Vitrone [mailto:jvitrone@giantbear.com]
Sent: Wednesday, March 14, 2001 9:52 AM
To: Struts User Mailing List (E-mail)
Subject: newbie question



I'm new to struts and I'm trying to create a little sample app, but I'm
getting this error when I try to go my index.jsp


javax.servlet.ServletException: Cannot find message resources under key
org.apache.struts.action.MESSAGE 
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:459) 
at
_0002findex_0002ejspindex_jsp_1._jspService(_0002findex_0002ejspindex_jsp_1.
java:315) 
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:177) 
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) 
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) 
at org.apache.tomcat.core.Handler.service(Handler.java:286) 
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) 
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7) 
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) 
at
org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection
(Ajp13ConnectionHandler.java:160) 
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)

at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) 
at java.lang.Thread.run(Thread.java:484) 

What does this mean? 

I would think that it means that it can't find the properties file, but I've
got this in my 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>BNPriceResources</param-value> 
                </init-param> 
                <init-param> 
                        <param-name>config</param-name> 
 
<param-value>/WEB-INF/my-example-config.xml</param-value> 
                </init-param> 
                <init-param> 
                        <param-name>debug</param-name> 
                        <param-value>2</param-value> 
                </init-param> 
                <init-param> 
                        <param-name>validate</param-name> 
                        <param-value>true</param-value> 
                </init-param> 
                <load-on-startup>1></load-on-startup>   
        </servlet> 

BNPriceResources is in my .../WEB-INF/classes folder and I've got
.../WEB-INF/classes in my classpath. 

Any help would be greatly appreciated. 

Thanks, 
        Jesse 


Mime
View raw message