fatcodeguy
Programmer
Hi,
I have jsp pages, running in Tomcat in the folder tomcat_root\webapps\ROOT\dev_folder\proj_folder, that uses property files to populate text and labels (so i can go between french and english).
When I access the page, i get a "java.util.MissingResourceException: Can't find bundle for base name home, locale en" error.
But the property file is there. Is there a specifc place i should put the file? Can I set a property file location?
Here's my jsp scriptlet:
I have jsp pages, running in Tomcat in the folder tomcat_root\webapps\ROOT\dev_folder\proj_folder, that uses property files to populate text and labels (so i can go between french and english).
When I access the page, i get a "java.util.MissingResourceException: Can't find bundle for base name home, locale en" error.
But the property file is there. Is there a specifc place i should put the file? Can I set a property file location?
Here's my jsp scriptlet:
Code:
<%
//vars
PropertyResourceBundle labels;
Locale currentLocale;
//get the locale from the session
//currentLocale=(Locale)session.getAttribute("locale");
currentLocale=Locale.ENGLISH;
//open the property files and get the tags.
labels=(PropertyResourceBundle)PropertyResourceBundle.getBundle("home",currentLocale);
//set the label bundle as session attribute
session.setAttribute("labels",labels);
%>
<h3><% out.println(labels.getString("home.title.text.t1")); %></h3>