Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with ResourceBundle and Weblogic

 
Ann Carpentier
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

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
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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".
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic