You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Thomas Eichberger <we...@java.at> on 2002/10/03 09:14:43 UTC
Re: [MessageResources] - in my Action: getResources(request)
returns null
What's the name of the properties file? Let's say
ApplicationResources.properties
This file has to be placed in the web-inf/classes directory.
At 08:10 03.10.2002 +0100, Alex Birch wrote:
>Hi,
>
>I can't find the answer to this anywhere but apologies if I missed
>something obvious
>
>I have the default ApplicationResources.properties in my web.xml
>
>in my action class, I've tried:
>
>MessageResources messages = getResources(request); // returns null
>MessageResources messages = getResources(request, Action.MESSAGES_KEY); //
>returns null
>MessageResources messages = getResources(request, "application"); //
>returns null
>MessageResources messages = getResources(request, "ApplicationResources");
>// returns null
>
>however, the deprecated
>MessageResources messages = getResources();
>returns what I want!
>
>is this a bug or am I doing something wrong?
>
>thanks in advance
>
>Alex
>
>
>__________________________________________________
>Do You Yahoo!?
>Everything you'll ever need on one web page
>from News and Sport to Email and Music Charts
>http://uk.my.yahoo.com
>
>--
>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [MessageResources] - in my Action: getResources(request) returns null
Posted by Alex Birch <al...@yahoo.co.uk>.
it's in WEB-INF/classes
called ApplicationResources.properties
it works when I use <bean:message key="prompt.login"/> so I know it's loaded ok
it also works when I call the deprecated getResources()...
just when I add the request param or the request and key param I get null
but getResources is deprecated so I don't want to use that!
Alex
--- Thomas Eichberger <we...@java.at> wrote: > What's the name of the properties file? Let's
say
> ApplicationResources.properties
>
> This file has to be placed in the web-inf/classes directory.
>
>
>
> At 08:10 03.10.2002 +0100, Alex Birch wrote:
> >Hi,
> >
> >I can't find the answer to this anywhere but apologies if I missed
> >something obvious
> >
> >I have the default ApplicationResources.properties in my web.xml
> >
> >in my action class, I've tried:
> >
> >MessageResources messages = getResources(request); // returns null
> >MessageResources messages = getResources(request, Action.MESSAGES_KEY); //
> >returns null
> >MessageResources messages = getResources(request, "application"); //
> >returns null
> >MessageResources messages = getResources(request, "ApplicationResources");
> >// returns null
> >
> >however, the deprecated
> >MessageResources messages = getResources();
> >returns what I want!
> >
> >is this a bug or am I doing something wrong?
> >
> >thanks in advance
> >
> >Alex
> >
> >
> >__________________________________________________
> >Do You Yahoo!?
> >Everything you'll ever need on one web page
> >from News and Sport to Email and Music Charts
> >http://uk.my.yahoo.com
> >
> >--
> >To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> >For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>