Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000892 [Resin] minor always 01-20-06 09:30 01-24-06 16:01
Reporter anonymous View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.0.18 Product Version 3.0.17
  Product Build
Summary 0000892: BundleTag does not find resources in jar files
Description 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.
Steps To Reproduce
Additional Information 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");
  }
Attached Files

- Relationships

- Notes
(0000773)
ferg
01-24-06 16:01

jsp/1c4a
 

- Issue History
Date Modified Username Field Change
01-20-06 09:30 anonymous New Issue
01-20-06 09:33 drice Issue Monitored: drice
01-24-06 16:01 ferg Note Added: 0000773
01-24-06 16:01 ferg Assigned To  => ferg
01-24-06 16:01 ferg Status new => closed
01-24-06 16:01 ferg Resolution open => fixed
01-24-06 16:01 ferg Fixed in Version  => 3.0.18


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
30 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker