struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivier Corbun <oliv...@sun.com>
Subject Re: Strurts - ApplicationResources.properties
Date Sat, 08 Sep 2001 18:25:18 GMT
you need to declare your properties file in web.xml
like this:

    <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.yourpackage..ApplicationResources</param-value>            
        </init-param>
        <init-param>
            <param-name>config</param-name>
            <param-value>/WEB-INF/struts-config.xml</param-value>
        </init-param>
    </servlet>

Parag Sagar wrote:
> 
> Hi ,
> I am new to struts.
> I am using Struts framework to fecilitate MVC architecture for my
> application.
> After runing my tomcat server it is not finding
> ApplicationResources.properties file.
> its in tomcat\jakarta-tomcat-3.2.3\webapps\struts-blank\WEB-INF\classes  dir
> 
> tomcat ver 3.2.3
> struts ver 1.0
> 
> pls see the Error log below.
> 
> Thanks,
> Parag.
> 
> Error: 500
> 
> Location: /struts-blank/index.jsp
> 
> Internal Servlet Error:
> 
> javax.servlet.ServletException: Missing message for key index.title
>         at
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
> l.java:459)
>         at
> _0002findex_0002ejspindex_jsp_0._jspService(_0002findex_0002ejspindex_jsp_0.
> java:227)
>         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$JspCountedServlet.service(JspServlet.ja
> va:130)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
> va:282)
>         at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
>         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
>         at org.apache.tomcat.core.Handler.service(Handler.java:287)
>         at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>         at
> org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81
> 2)
>         at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
>         at
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
> onnectionHandler.java:213)
>         at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
>         at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
>         at java.lang.Thread.run(Thread.java:484)
> 
> Root cause:
> 
> javax.servlet.jsp.JspException: Missing message for key index.title
>         at
> org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:242)
>         at
> _0002findex_0002ejspindex_jsp_0._jspService(_0002findex_0002ejspindex_jsp_0.
> java:90)
>         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$JspCountedServlet.service(JspServlet.ja
> va:130)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
> va:282)
>         at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
>         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
>         at org.apache.tomcat.core.Handler.service(Handler.java:287)
>         at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>         at
> org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81
> 2)
>         at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
>         at
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
> onnectionHandler.java:213)
>         at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
>         at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
>         at java.lang.Thread.run(Thread.java:484)

Mime
View raw message