You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Eung-ju Park <co...@apache.org> on 2001/10/04 05:16:58 UTC

Resource file name for Class.

Hi.
I write small servlet which use ResourceManager.
but ResourceManager.getClassResources( MyServlet.class ) thorws
MissingResourcesException.

getClassResources find Resources.properties file in package
foo.bar.MyServlet. It's not
I think foo.bar.MyServlet.properties for better resource file name. How
about you?


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


Re: Resource file name for Class.

Posted by Eung-ju Park <co...@apache.org>.
----- Original Message -----
From: "Peter Donald" <do...@apache.org>
To: "Avalon Development" <av...@jakarta.apache.org>
Sent: Thursday, October 04, 2001 6:13 PM
Subject: Re: Resource file name for Class.


> On Thu, 4 Oct 2001 13:16, Eung-ju Park wrote:
> > Hi.
> > I write small servlet which use ResourceManager.
> > but ResourceManager.getClassResources( MyServlet.class ) thorws
> > MissingResourcesException.
> >
> > getClassResources find Resources.properties file in package
> > foo.bar.MyServlet. It's not
> > I think foo.bar.MyServlet.properties for better resource file name. How
> > about you?
>
> Hmmm ... I haven't looked at the code recently but the way I originally
> intended to use it was to look for class name + "Resources.properties". So
> you would search for
>
> foo.bar.MyServletResources.properties
>
> I am not sure that is as good as "foo.bar.MyServlet.properties" but I
think I
> prefer to append "Resources". However what you can do is make it search in
> both places, at "foo.bar.MyServletResources.properties" and then at
> "foo.bar.MyServlet.properties". As long as the first one postfixes
Resources
> it should be backwards compatible.

Me too. ;-) I am not sure "foo.bar.MyServlet.properties" is as good as
"foo.bar.MyServletResources.properties".
OK if your orginal intention is "foo.bar.MyServletResources.properties".
I will just fix problem. ;-)

>
> --
> Cheers,
>
> Pete
>
> *---------------------------------------------------------*
> | Contrary to popular belief, UNIX is user-friendly. It   |
> | just happens to be selective on who it makes friendship |
> | with.                                                   |
> |                       - Richard Cook                    |
> *---------------------------------------------------------*
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: avalon-dev-help@jakarta.apache.org
>
>


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


Re: Resource file name for Class.

Posted by Peter Donald <do...@apache.org>.
On Thu, 4 Oct 2001 13:16, Eung-ju Park wrote:
> Hi.
> I write small servlet which use ResourceManager.
> but ResourceManager.getClassResources( MyServlet.class ) thorws
> MissingResourcesException.
>
> getClassResources find Resources.properties file in package
> foo.bar.MyServlet. It's not
> I think foo.bar.MyServlet.properties for better resource file name. How
> about you?

Hmmm ... I haven't looked at the code recently but the way I originally 
intended to use it was to look for class name + "Resources.properties". So 
you would search for 

foo.bar.MyServletResources.properties

I am not sure that is as good as "foo.bar.MyServlet.properties" but I think I 
prefer to append "Resources". However what you can do is make it search in 
both places, at "foo.bar.MyServletResources.properties" and then at 
"foo.bar.MyServlet.properties". As long as the first one postfixes Resources 
it should be backwards compatible.

-- 
Cheers,

Pete

*---------------------------------------------------------*
| Contrary to popular belief, UNIX is user-friendly. It   |
| just happens to be selective on who it makes friendship |
| with.                                                   |
|                       - Richard Cook                    |
*---------------------------------------------------------*

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