Re: Resources.properties - trick?

2001-04-09 Thread Darryl

Michael,

Looks like you're asking basically the same thing I was asking in my note
titled: "Bundle attribute for bean:message tag???"

The reason you're getting that error is that the MessageResources object has
not been initialized and placed in the session (page?) context under the key
"org.apache.struts.action.MESSAGE". It seems like you have to actually use the
ActionServlet to get this to happen. There's probably a way that one can hack
around this and instantiate it programatically at startup but I was hoping
there was some way Struts can do this already without me having to do a hack
solution.

Hopefully someone in the group will respond to our problem.

thanks,
Darryl

Michael Schommer wrote:

 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-nameapplication/param-name
   param-valueResources/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
 

RE: Resources.properties - trick?

2001-04-09 Thread Geddes, Mark (ANTS)

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-nameapplication/param-name
  param-valueResources/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

Re: Resources.properties - trick?

2001-04-09 Thread Darryl

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-nameapplication/param-name
   param-valueResources/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
 

RE: Resources.properties - trick?

2001-04-09 Thread Geddes, Mark (ANTS)

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-nameapplication/param-name
   param-valueResources/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.Appli

Re: Resources.properties - trick?

2001-04-09 Thread Michael Schommer

Sorry,
my ResourceBundle is called Resources.properties of course - the error was
in the mail.
Is there any other idea??? ...what could be wrong?



|+---
||  Darryl   |
||  [EMAIL PROTECTED]|
||  o.za|
||   |
||  09.04.01 |
||  14:10|
||  Please   |
||  respond to   |
||  struts-user  |
||   |
|+---
  ---|
  |   |
  |   To: [EMAIL PROTECTED]  |
  |   cc: (bcc: Michael Schommer/PDD/DEV/LU/FERNBACH) |
  |   Subject: Re: Resources.properties - trick? |
  ---|





Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: quoted-printable



Michael,
Sorry, it looks like I've responded too quickly to your note. I must ha=
ve
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 o=
f my
 application.
 The web.xml looks like:
  ...
 init-param
   param-nameapplication/param-name
   param-valueResources/param-value
 /init-param
 ...

 In the JSP-file the bean:message-Tag is:
bean:message key=3D"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 k=
ey
 org.apache.struts.action.MESSAGE
 at

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageConte=
xtIm
 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:85=
3)
 at

org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServl=
et.j
 ava:184)
 at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3=
28)
 at
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:407)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:85=
3)
 at

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil=
terC
 hain.java:215)
 at

org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal=
ve.j
 ava:251)
 at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)=

 at

org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal=
ve.j
 ava:196)
 at
 org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
 at

org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.j=
ava:
 242)
 at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)=

 at

org.apache.catalina.core.StandardContext.invoke(StandardContext.java:20=
41)
 at

org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav=
a: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 k=
ey
 org.apache.struts.action.MESSAGE
 at
 org.apache.struts.util.RequestUtils.message(RequestUtils.java:285)

RE: Resources.properties - trick?

2001-04-09 Thread Geddes, Mark (ANTS)

Is your ActionServlet being loaded on startup?
Is your ResourceBundle not in a package? The param-value should be a fully
qualified class.

Mark


-Original Message-
From: Michael Schommer [mailto:[EMAIL PROTECTED]]
Sent: 09 April 2001 13:33
To: [EMAIL PROTECTED]
Subject: Re: Resources.properties - trick?


Sorry,
my ResourceBundle is called Resources.properties of course - the error was
in the mail.
Is there any other idea??? ...what could be wrong?



|+---
||  Darryl   |
||  [EMAIL PROTECTED]|
||  o.za|
||   |
||  09.04.01 |
||  14:10|
||  Please   |
||  respond to   |
||  struts-user  |
||   |
|+---
  ---|
  |   |
  |   To: [EMAIL PROTECTED]  |
  |   cc: (bcc: Michael Schommer/PDD/DEV/LU/FERNBACH) |
  |   Subject: Re: Resources.properties - trick? |
  ---|





Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: quoted-printable



Michael,
Sorry, it looks like I've responded too quickly to your note. I must ha=
ve
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 o=
f my
 application.
 The web.xml looks like:
  ...
 init-param
   param-nameapplication/param-name
   param-valueResources/param-value
 /init-param
 ...

 In the JSP-file the bean:message-Tag is:
bean:message key=3D"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 k=
ey
 org.apache.struts.action.MESSAGE
 at

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageConte=
xtIm
 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:85=
3)
 at

org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServl=
et.j
 ava:184)
 at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3=
28)
 at
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:407)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:85=
3)
 at

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil=
terC
 hain.java:215)
 at

org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal=
ve.j
 ava:251)
 at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)=

 at

org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal=
ve.j
 ava:196)
 at
 org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
 at

org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.j=
ava:
 242)
 at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)=

 at

org.apache.catalina.core.StandardContext.invoke(StandardContext.java:20=
41)
 at

org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav=
a: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.catali

Re: Resources.properties - trick?

2001-04-09 Thread Darryl

Mark,

One scenario would be when I'm doing some prototyping and I don't want to necessarily 
setup an ActionServlet to do some quick form designs etc. I might however, want to 
quickly play around with the page parameters using a properties file.

This is in fact the scenario in which I find myself right now. I'm POC'ing a 
template-based framework and I wanted to do a few screen prototypes but couldn't get 
the properties file stuff to work, hence my initial note. I didn't want to implement a 
separate solution as you
suggested I should do before I could determine whether or not something existed within 
Struts to do the same.

Thanks nonetheless for the responses.

- Darryl

"Geddes, Mark (ANTS)" wrote:

 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-nameapplication/param-name
param-valueResources/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: Cann

Re: Resources.properties - trick?

2001-04-09 Thread Menno M Jansz

09/04/2001 17:44:58, Darryl [EMAIL PROTECTED] wrote:

Mark,

One scenario would be when I'm doing some prototyping and I don't want to necessarily 
setup an ActionServlet to do some 
quick form designs etc. I might however, want to quickly play around with the page 
parameters using a properties file.

It's actually pretty quick to setup an Action servlet, I just did it for a prototype 
here, up and running in 2 days. Unfortunately now 
the use of open source code is a problem for our company, so looks like we'll have to 
re-invent the wheel :(

Cheers,
Menno