3

I have a JAVA project with the following maven structure.

Project
   |-- src
   |    |-- main
   |         |-- java
   |         |     |-- {java classes}
   |         |-- resources
   |         |     |-- xslt 
   |         |     |    |-- {resource files}
   |         |     |-- ResourceBundle_si.properties 
   |         |-- webapp
   |               |-- {html/css/js}
   |-- pom.xml

ResourceBundle.properties file is used to localize the labels of XSLT file.

<xsl:variable name="locale" select="java:java.util.Locale.new('si')"/>
<xsl:variable name="resources" select="java:java.util.ResourceBundle.getBundle('ResourceBundle', $locale)"/>

But when I try to run the web app I'm getting following RuntimeException.

java.util.MissingResourceException: Can't find bundle for base name ResourceBundle, locale si

I'm using Xalan for XSLT transformation and war file is deployed in Jetty 9 server. I have already referred following question and nothing worked.

Can't find bundle for base name /Bundle, locale en_US

I have also unzip the war file and confirmed that ResourceBundle_si.properties file is correctly placed within WEB-INF/classes folder

does anyone know what is the exact problem?

Chathura Buddhika
  • 2,067
  • 1
  • 21
  • 35

0 Answers0