avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: Resource file name for Class.
Date Thu, 04 Oct 2001 09:13:40 GMT
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


Mime
View raw message