Question

Currently i have placed the Displaytag.properties in 'src' directory, and it is working fine. Is it posssible to have this file on some different location like src/comp/bre/sub/config ?

Was it helpful?

Solution

From the docs for the DisplayTag library:

For the whole web application, create a custom properties file named "displaytag.properties" and place it in the application classpath. Displaytag will use the locale of the request object to determine the locale of the property file to use; if the key required does not exist in the specified file, the key will be loaded from a more general property file.

So in your case make sure your build scripts (or IDE) copy your displaytag.properties file from src/comp/bre/sub/config the onto the classpath.

In an IDE this is normally as simple as specifying that a particular directory contains source code. In ANT just make sure the displaytag.properties file ends up in your /WEB-INF/classes.

OTHER TIPS

Find the code which loads this properties file and add the new path. You can also place it in a folder yourProject/src/resources/ and add it to the classpath. Therefore, your properties file will be placed in the binary folder once the code will be compiled.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top