[opencms-dev] ResourceBundle and OpenCMS
Hartmann, Waehrisch & Feykes GmbH
hartmann at waehrisch-feykes.de
Tue Oct 21 09:58:01 CEST 2003
Hi Trevor,
ResourceBundles are loaded by the class loader, so your properties files
have to be somewhere in your classpath.
During development you can create and edit them with your favorite editor
under your $WEBAPPS/opencms/WEB-INF/classes/ folder (for your example:
$WEBAPPS/opencms/WEB-INF/classes/myProj/mine*, although this is not java
naming convention). When you are done you should put them into your module's
classes folder in opencms.
Remember: When you edit your properties files you have to restart tomcat.
Bye,
Stephan
----- Original Message -----
From: "Trevor Lee" <Trevor.Lee at 4Loop.com.au>
To: <opencms-dev at opencms.org>
Sent: Tuesday, October 21, 2003 6:58 AM
Subject: [opencms-dev] ResourceBundle and OpenCMS
> Hi
>
> I have a file "mine.properties" which is a simple key=value file. The
> intention is to use this file to load values into a jsp page based on
locale
> using the ResourceBundle().
>
> I was wondering where i should put this property file within opencms. The
> jsp page i have that calls the ResourceBundle.getBundle() exists in the
> project directory (myProj) along with the mine.properties file.
>
> The jsp has the following line:
> ResourceBundle registryBundle = ResourceBundle.getBundle("myProj.mine");
>
> I get the error message:
> javax.servlet.ServletException: Resource loader error in file
> '/myProj/mine.jsp'
> Root cause:
> org.apache.jasper.JasperException: Can't find bundle for base name
> myProj.mine, locale en_US
>
> I have also tried placing it in the classes directory of my module.
>
> any help in the above would be most appreciated.
>
> Thank you
>
> Cheers
> Trevor
>
>
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
>
Stephan Hartmann
Unternehmensberatung Währisch & Feykes GmbH
Gustav-Adolf-Str. 5
47057 Duisburg
Tel.: 0203-373070
Fax: 0203-376766
E-Mail: hartmann at wfnetz.de
Internet: www.wfnetz.de
Über das Internet versandte E-Mails können unter fremden Namen erstellt oder
manipuliert werden. Aus diesem Grund enthalten unsere mit E-Mail
verschickten Nachrichten grundsätzlich keine rechtsverbindlichen
Willenserklärungen.
More information about the opencms-dev
mailing list