java - How to configure properties file in MyEclipse? -
i trying retrieve info properties file dropdown using resourcebundle getting error
java.util.missingresourceexception: can't find bundle base of operations name `color`, locale en_us java.util.resourcebundle.throwmissingresourceexception(resourcebundle.java:1521) java.util.resourcebundle.getbundleimpl(resourcebundle.java:1260) here color name of properties file
the partial code :
<select name="color2"> <option value="empty">select color2</option> <% resourcebundle rb = resourcebundle.getbundle("color"); enumeration<string> serverkeys = rb.getkeys(); while(serverkeys.hasmoreelements()) { string key = (string)serverkeys.nextelement(); string value = rb.getstring(key); %> <option value="<%=rb.getstring(key)%>"><%=rb.getstring(key)%></option> <% } %> </select> and location of properties file :
/test/webroot/web-inf/properties/color.properties
test name of project
the question isn't related myeclipse seek putting properties file in src folder on classpath.
java html jsp resourcebundle properties-file
No comments:
Post a Comment