You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dani <mc...@wanadoo.es> on 2003/04/09 13:31:57 UTC

RE: Cannot find message resources under keyorg.apache.struts.action.MESSAGE

Uff!. Sorry, I didn't understand your answers (because of my terrible
English). I've made some changes, and it doesn't work.

I have struts 1.1.

My web.xml is :

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
  "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app><servlet>
  <servlet-name>action</servlet-name>
  <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
  <!--                                         I HAVE COMMENTED THESE LINES
***
  <init-param>
   <param-name>application</param-name>
   <param-value>GspMensajes</param-value>
  </init-param>
  -->
  <init-param>
   <param-name>config</param-name>
   <param-value>/WEB-INF/struts-config.xml</param-value>
  </init-param>
  <init-param>
   <param-name>debug</param-name>
   <param-value>2</param-value>
  </init-param>
  <init-param>
   <param-name>detail</param-name>
   <param-value>2</param-value>
  </init-param>
  <init-param>
   <param-name>validate</param-name>
   <param-value>true</param-value>
  </init-param>
  <init-param>
   <param-name>nocache</param-name>
   <param-value>true</param-value>
  </init-param>
  <load-on-startup>2</load-on-startup> ...... (etc,etc)


The file struts-config.xml has these lines:
<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
*** I'VE HAVE CHANGED THIS LINE TO struts-config_1.1
          "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">

<struts-config>
 <action-mappings>
<message-resources parameter="GspMensajes"/>
                                **** NOW THIS IS THE PATH OF MY RESOURCE:
TOMCAT\webapps\gsp\WEB-INF\classes\GspMensajes.properties

  </action-mappings>

</struts-config>

Is this corret??


----- Original Message -----
From: James Mitchell <jm...@apache.org>
To: Struts Users Mailing List <st...@jakarta.apache.org>
Sent: Wednesday, April 09, 2003 1:18 PM
Subject: Re: Cannot find message resources under
keyorg.apache.struts.action.MESSAGE


> On Wed, 2003-04-09 at 06:55, Alessio wrote:
> > You set the resource in web.xml file?
>
> Not in 1.1.  You declare it in the struts-config.xml (or whatever you've
> named it).  See the docs, dtd, or any one of many example apps for
> details on how to configure it.
>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> --
> James Mitchell
> Software Developer/Struts Evangelist
> http://www.open-tools.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>


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


RE: Cannot find message resources under keyorg.apache.struts.action.MESSAGE

Posted by James Mitchell <jm...@apache.org>.
That looks right.  It still doesn't work?

On Wed, 2003-04-09 at 07:31, Dani wrote:
> 
> Uff!. Sorry, I didn't understand your answers (because of my terrible
> English). I've made some changes, and it doesn't work.
> 
> I have struts 1.1.
> 
> My web.xml is :
> 
> <?xml version="1.0" encoding="ISO-8859-1"?>
> 
> <!DOCTYPE web-app
>   PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
>   "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
> 
> <web-app><servlet>
>   <servlet-name>action</servlet-name>
>   <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
>   <!--                                         I HAVE COMMENTED THESE LINES
> ***
>   <init-param>
>    <param-name>application</param-name>
>    <param-value>GspMensajes</param-value>
>   </init-param>
>   -->
>   <init-param>
>    <param-name>config</param-name>
>    <param-value>/WEB-INF/struts-config.xml</param-value>
>   </init-param>
>   <init-param>
>    <param-name>debug</param-name>
>    <param-value>2</param-value>
>   </init-param>
>   <init-param>
>    <param-name>detail</param-name>
>    <param-value>2</param-value>
>   </init-param>
>   <init-param>
>    <param-name>validate</param-name>
>    <param-value>true</param-value>
>   </init-param>
>   <init-param>
>    <param-name>nocache</param-name>
>    <param-value>true</param-value>
>   </init-param>
>   <load-on-startup>2</load-on-startup> ...... (etc,etc)
> 
> 
> The file struts-config.xml has these lines:
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> 
> <!DOCTYPE struts-config PUBLIC
>           "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
> *** I'VE HAVE CHANGED THIS LINE TO struts-config_1.1
>           "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
> 
> <struts-config>
>  <action-mappings>
> <message-resources parameter="GspMensajes"/>
>                                 **** NOW THIS IS THE PATH OF MY RESOURCE:
> TOMCAT\webapps\gsp\WEB-INF\classes\GspMensajes.properties
> 
>   </action-mappings>
> 
> </struts-config>
> 
> Is this corret??
> 
> 
> ----- Original Message -----
> From: James Mitchell <jm...@apache.org>
> To: Struts Users Mailing List <st...@jakarta.apache.org>
> Sent: Wednesday, April 09, 2003 1:18 PM
> Subject: Re: Cannot find message resources under
> keyorg.apache.struts.action.MESSAGE
> 
> 
> > On Wed, 2003-04-09 at 06:55, Alessio wrote:
> > > You set the resource in web.xml file?
> >
> > Not in 1.1.  You declare it in the struts-config.xml (or whatever you've
> > named it).  See the docs, dtd, or any one of many example apps for
> > details on how to configure it.
> >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> > --
> > James Mitchell
> > Software Developer/Struts Evangelist
> > http://www.open-tools.org
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
-- 
James Mitchell
Software Developer/Struts Evangelist
http://www.open-tools.org




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