You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Richard Raquepo <rr...@primeorion.com> on 2003/06/02 12:15:04 UTC

using message resources

can someone show me how to use message-resources? i can't seem to get it right by following the documention.

the filename of my application resources is ApplicationResources.properties

i use to put my message resources in web.xml under my servlet using 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>ApplicationResources</param-value>
    </init-param>
....
  </servlet>

>>> the above work .

now how do i put the message-resources tag... i put it on my struts-config.xml but i cannot make my application 
run... i always get this error:

    [ServletException in:/layouts/crmDefaultLayout.jsp] Cannot find message resources under key org.apache.struts.action.MESSAGE'

my message-resources config looks like this:


  <message-resources>
   <param-name>parameter</param-name>
   <param-value>/WEB-INF/classes/ApplicationResources.properties</param-value>
  </message-resources>


hope anyone could teach me and show me how to use message-resources... thanks

Re: using message resources

Posted by "Frances Aleah Z. de Guzman" <ad...@ingenium.com.ph>.
what web server are you using?

On Monday 02 June 2003 06:15 pm, Richard Raquepo wrote:
> can someone show me how to use message-resources? i can't seem to get it
> right by following the documention.
>
> the filename of my application resources is ApplicationResources.properties
>
> i use to put my message resources in web.xml under my servlet using 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>ApplicationResources</param-value>
>     </init-param>
> ....
>   </servlet>
>
> >>> the above work .
>
> now how do i put the message-resources tag... i put it on my
> struts-config.xml but i cannot make my application run... i always get this
> error:
>
>     [ServletException in:/layouts/crmDefaultLayout.jsp] Cannot find message
> resources under key org.apache.struts.action.MESSAGE'
>
> my message-resources config looks like this:
>
>
>   <message-resources>
>    <param-name>parameter</param-name>
>   
> <param-value>/WEB-INF/classes/ApplicationResources.properties</param-value>
> </message-resources>
>
>
> hope anyone could teach me and show me how to use message-resources...
> thanks

-- 
Frances Aleah Z. De Guzman
SA/Programmer
Ingenium Technology, Inc.
http://www.ingenium.com.ph

Disclaimer :
This message is intended only for the named recipient. If you are not the
intended recipient you are notified that disclosing, copying, distributing
or taking any action in reliance on the contents of this information is
strictly prohibited.



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: using message resources

Posted by Trung Le <lh...@optusnet.com.au>.
Have the file AppResources.properties in your web app. class path (could be
right under classes dir)
Declare message resource in struts-config.xml:
    <message-resources parameter="AppResources"/>
Alternatively, if you choose to put it under
/WEB-INF/classes/com/my/package/AppResources.properties,
you can declare:
    <message-resources parameter="com.my.package.AppResources"/>

The point is to declare AppResources as a class (with a .properties
extension) and make sure it's visible to the class loader.

-----Original Message-----
From: Richard Raquepo [mailto:rraquepo@primeorion.com]
Sent: Monday, 2 June 2003 8:15 PM
To: Struts Users Mailing List
Subject: using message resources


can someone show me how to use message-resources? i can't seem to get it
right by following the documention.

the filename of my application resources is ApplicationResources.properties

i use to put my message resources in web.xml under my servlet using 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>ApplicationResources</param-value>
    </init-param>
....
  </servlet>

>>> the above work .

now how do i put the message-resources tag... i put it on my
struts-config.xml but i cannot make my application
run... i always get this error:

    [ServletException in:/layouts/crmDefaultLayout.jsp] Cannot find message
resources under key org.apache.struts.action.MESSAGE'

my message-resources config looks like this:


  <message-resources>
   <param-name>parameter</param-name>

<param-value>/WEB-INF/classes/ApplicationResources.properties</param-value>
  </message-resources>


hope anyone could teach me and show me how to use message-resources...
thanks



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org