servlets - Resource bundle class in java throwing excetion while reading the properties file -


i trying read properties file using resource bundle class in java, giving me exception saying

java.util.missingresourceexception: can't find bundle base name jira, locale en_us 

this how coding in java

resourcebundle labels = resourcebundle.getbundle("jira"); 

this project structure enter image description here

what missing? have read through documentation , says no need give absolute path resource bundle handles that.

resourcebundles read classpath. web-inf/conf not on classpath web applications. try placing property file in web-inf/classes.

from above image appears using maven build project. in case property file can moved src/main/resources folder copied classes during maven build.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -