I have a property file placed in the root of the web project in Java. I am using Struts 2. My code is unable to read properties file. Where should I keep my properties file?
Ideally, you can save properties files in: /src/com/cft/web/bundle/. like, /src/com/cft/web/bundle/LabelResources.properties OR /src/com/cft/web/bundle/Applicationresources.properties.
in fact its up to you to give whatever the path you like.
Just remember to add the correct complete path in web.xml/struts-config.xml
for ex=g. 1. in web.xml :
Application Resources
ApplicationResources
com.cft.web.bundle.ApplicationResources
java.lang.String