Markus Keller mssc wrote:
> Hi List
>
> I have to write a web application that supports multiple languages. When I
> write a servlet with the needed *.properties files in the classes directory
> it works fine. But when i do something like <% messages =
> ResourceBundle.getBundle("language",currentLocale); %> in a JSP page I
> receive a MissingResourceException when the properties files are in the
> same directory as the jsp file. When I save the porperties files in the
> TOMCAT_HOME\work\default\myapp directory, where tomcat saves the servlets
> created from my JSP files, the files work. Now saving the properties files
> in the work directory is a bad idea I think. How can I tell tomcat where to
> search for the properties files if I use them in a JSP page? I will be glad
> for every tipp.
>
Resource bundles are searched for on the web application's "class path", not in
the document root directory. So, if you have a file "Foo.properties" that you
want to access as a ResourceBundle, put it in the WEB-INF/classes directory of
your web app (or inside a JAR file under WEB-INF/lib).
>
> Markus
>
Craig McClanahan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]