Based from the information I've read, in order for you to expose your properties to the .jsp, you will have to set the properties file at the same level as your action method. Currently, this is how my sample app directory looks like:
app | | build | src | some.package.login | Login.java | Login.properties | WebContent | META-INF | WEB-INF | login | login.jsp
As you can see, my
Login.properties is in the same folder as my
Login.java. This bothers me a lot seeing that once my application grows, there would be lots of property files that will be scattered around in various folders inside my
I was wondering if there is a way to consolidate all these property files into a single folder (probably
src/resources) and tell Struts to look there for the property files just so that my property files aren't scattered around everywhere.
EDIT: I also wanted to know the best practices regarding property files. There are two kinds: the
local and the
global. I'm planning to place action-specific properties in local property files and I'm planning to put generic / static texts (to be rendered in the JSP) in the global property file. Is this a good practice?