wood burning stoves
The moose likes JSP and the fly likes Problem with ResourceBundle and Weblogic Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Problem with ResourceBundle and Weblogic" Watch "Problem with ResourceBundle and Weblogic" New topic

Problem with ResourceBundle and Weblogic

Ann Carpentier

Joined: Sep 22, 2004
Posts: 5

I'm developping a website with Weblogic 8.1 and I'm having some problems with resourceBundle. The site has to be in Dutch and French.
I've created 3 property-files (resources.properties, resources_nl.properties and resources_fr.properties). The property-files are saved in the directory WEB-INF/classes.

When I run this, I get the following error

I've also tried:
ResourceBundle labels = ResourceBundle.getBundle("resources", currentLocale);

Can anyone help me??

(N.Pruett - edited long error message line - was widening the page.)
[ September 22, 2004: Message edited by: Nathan Pruett ]
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

Try changing the line :

To something like :

I think the basename is used by a ClassLoader to find the resource bundle property file. Specifying the full path confuses the ClassLoader and it won't find your files. Just specify the files and/or directories below where the classpath is defined - since "/belpic/WEB-INF/classes" should be on the classpath, all you need to define is "/resources".

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
I agree. Here's the link: http://aspose.com/file-tools
subject: Problem with ResourceBundle and Weblogic
It's not a secret anymore!