File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
ResourceBundle use in Web application
Joined: Jun 12, 2005
Oct 01, 2007 08:32:00
I am going to write I18N code in my jsp based application. Here i will use a custom tag like bean:message. I want to load properties bundle using
I just want to know which is the place in web application
1. in root
2. under /WEB-INF/classes
3. or undeer /WEB-INF/classes/com/...so where in classes level.
Which consructor of
i should use if i have my properties file under /WEB-INF/resources/MyBundle_en_US.properties
Please help me to sort out this issue. Is there any use of
Author and ninkuma
Joined: Jan 10, 2002
Oct 01, 2007 08:39:00
Since you will be using a proprietary Struts tag in place of the standardized JSTL tags, this has been moved to the Struts forum.
Asking smart questions
Books by Bear
Joined: Feb 08, 2006
Oct 01, 2007 15:54:00
I think you want to use the /WEB-INF/classes directory (a directory on the classpath). If your file is:
Your could should be:
bundle = ResourceBundle.getBundle("resources.MyBundle_en_US");
I agree. Here's the link:
subject: ResourceBundle use in Web application
SQL statements in files in jars - best practice suggestions?
MissingResourceException due to class loader constellation (caller not in WEB-INF/classes)
importing a package which is in different application
Reading property files within a servlet
properties file using the ResourceBundle class?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013