I am attempting to integrate VelocityTools.ResourceTool to localize velocity template but whatever I personally use because the 'bundles' parameter I keep obtaining the following error:
java.util.MissingResourceException: Can't find bundle for base name WEB-INF.conf.resources.ss_messages, locale en_US
I am using VelocityTools v1.4. Listed here are my designs:
<tool> <key>test</key> <scope>request</scope> <class>org.apache.velocity.tools.generic.ResourceTool</class> <parameter name="bundles" value="WEB-INF.conf.resources.ss_messages"/> <parameter name="locale" value="en_US"/> </tool>
The 2 files have simple content:
full.name=\u0421\u0442\ (for bg_BG.properties) full.name=Joe Blow (for en_US.properties)
My Velocity template has this code:
I attempted different values for that
name="bundles" above i.e.,
./conf/resources/ss_messages (visiting the root dir after which referencing the ss_messages bundle).
Also, I attempted putting my ss_messages.qualities bundle files inside a
resources folder within the root and employ the
value="resources" rather, but nothing appears to become working...still obtaining the same error message.
What shall we be held doing wrong?! One thing the
toolbox.xml file isn't within the root? I have used effectively the
toolbox.xml throughout my application until recently.