I'm not sure how (or why) you should use the Struts implementation without
using the Action servlet. However, Sun's i18n tutorial provides guidelines
for using ResourceBundles backed up with properties files.

http://java.sun.com/docs/books/tutorial/i18n/index.html

Mark

-----Original Message-----
From: Darryl [mailto:[EMAIL PROTECTED]]
Sent: 09 April 2001 13:11
To: [EMAIL PROTECTED]
Subject: Re: Resources.properties -> trick?


Michael,

Sorry, it looks like I've responded too quickly to your note. I must have
been asleep when I read your note to have missed that you were using
init-params. I apologize for the misstep.

I think Mark has probably identified your problem correctly. Mark, any idea
how to use a MessageResource file WITHOUT having to use ActionServlet.

thanks,
Darryl

"Geddes, Mark (ANTS)" wrote:

> Is your ResourceBundle called "Resources.properties" or
> "Resource.properties"?
>
> Your mail implies a mis-match.
>
> Also, I assume your <init-param> is for the Struts Action Servlet.
>
> Mark
>
> -----Original Message-----
> From: Michael Schommer [mailto:[EMAIL PROTECTED]]
> Sent: 09 April 2001 12:57
> To: [EMAIL PROTECTED]
> Subject: Resources.properties -> trick?
>
> Hi,
>
> is there a trick using a "Resource.properties"-file.
>
> I'm creating a "Resource.properties"-file in WEB-INF/classes folder of my
> application.
> The web.xml looks like:
>      ...
>     <init-param>
>       <param-name>application</param-name>
>       <param-value>Resources</param-value>
>     </init-param>
>     ...
>
> In the JSP-file the bean:message-Tag is:
>            <bean:message key="index.benutzername"/>
>
> By running the application an error displays
> The Error is:
>
> A Servlet Exception Has Occurred
>
> Exception Report:
>
> javax.servlet.ServletException: Cannot find message resources under key
> org.apache.struts.action.MESSAGE
>         at
>
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextIm
> pl.java:481)
>         at
>
_0002findex_0002ejspindex_jsp_161._jspService(_0002findex_0002ejspindex_jsp
> _161.java:513)
>         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.j
> ava:184)
>         at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:328)
>         at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:407)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC
> hain.java:215)
>         at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j
> ava:251)
>         at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
>         at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j
> ava:196)
>         at
> org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
>         at
>
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:
> 242)
>         at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
>         at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2041)
>         at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:16
> 1)
>         at
> org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
>         at
>
org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:225
> )
>         at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
>         at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav
> a:159)
>         at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
>         at
>
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java
> :818)
>         at
>
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:897
> )
>         at java.lang.Thread.run(Thread.java:484)
>
> Root Cause:
>
> javax.servlet.jsp.JspException: Cannot find message resources under key
> org.apache.struts.action.MESSAGE
>         at
> org.apache.struts.util.RequestUtils.message(RequestUtils.java:285)
>         at
> org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:239)
>         at
>
_0002findex_0002ejspindex_jsp_161._jspService(_0002findex_0002ejspindex_jsp
> _161.java:168)
>         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.j
> ava:184)
>         at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:328)
>         at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:407)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC
> hain.java:215)
>         at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j
> ava:251)
>         at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
>         at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j
> ava:196)
>         at
> org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
>         at
>
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:
> 242)
>         at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
>         at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2041)
>         at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:16
> 1)
>         at
> org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
>         at
>
org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:225
> )
>         at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
>         at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav
> a:159)
>         at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
>         at
>
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java
> :818)
>         at
>
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:897
> )
>         at java.lang.Thread.run(Thread.java:484)
>
> Knows anybody why it doesn't run?
>
> Gruß
> Michael
>
> --
> Mein Freund ist aus Leder
>
>
***************************************************************************
> This email message contains confidential information for the above
addressee only.  If you are not the intended addressee you must not disclose
or use the information in any manner whatsoever.
>
> Any opinion or views contained in this email message are those of the
sender, do not represent those of the Company in any way and reliance should
not be placed upon its contents.
>
> Unless otherwise stated this email message is not intended to be
contractually binding.  Where an Agreement exists between our respective
companies and there is conflict between the contents of this email message
and the Agreement then the terms of that Agreement shall prevail.
>
> Abbey National Treasury Services plc. Registered in England. Registered
Office:  Abbey House, Baker Street, London NW1 6XL.  Company Registration
No: 2338548.  Regulated by the SFA
>
***************************************************************************



***************************************************************************
This email message contains confidential information for the above addressee only.  If 
you are not the intended addressee you must not disclose or use the information in any 
manner whatsoever.

Any opinion or views contained in this email message are those of the sender, do not 
represent those of the Company in any way and reliance should not be placed upon its 
contents.

Unless otherwise stated this email message is not intended to be contractually 
binding.  Where an Agreement exists between our respective companies and there is 
conflict between the contents of this email message and the Agreement then the terms 
of that Agreement shall prevail.

Abbey National Treasury Services plc. Registered in England. Registered Office:  Abbey 
House, Baker Street, London NW1 6XL.  Company Registration No: 2338548.  Regulated by 
the SFA
***************************************************************************

Reply via email to