Mantis - Resin
Viewing Issue Advanced Details
892 minor always 01-20-06 09:30 01-24-06 16:01
anonymous  
ferg  
normal  
closed 3.0.17  
fixed  
none    
none 3.0.18  
0000892: BundleTag does not find resources in jar files
We recently moved our resource property files into jar files and our <fmt:bundle> lookups stopped working.

Here is what the code looked like:

  <fmt:bundle basename="fully.qualified.path.CommonMessages">

This does not work when our property files are in jars.
Tracked it down to BundleManager line 214:

      InputStream is = loader.getResourceAsStream(name.replace('.', '/') + ".properties");

Properties files in jar files need a leading '/'. The workaround is to write the resource lookup with '/my.full.path.MyBundle', which is ugly but works.

Adding this line just after 214 should fix it:
  if (is == null) {
     is = loader.getResourceAsStream('/' + name.replace('.', '/') + ".properties");
  }

Notes
(0000773)
ferg   
01-24-06 16:01   
jsp/1c4a