Similar to how you can specify an mycontext.xml in conf/Catalina/localhost to
specify the context without having to modify prepackaged WAR files, can you
so something like place files in context-specific folders (i.e.
conf/Catalina/localhost/mycontext/resource1.properties) that would be
accessible from the classpath of the web app?

If it doesn't exist, would it be a good feature request? It would accomplish
multiple things:
- Wouldn't expose the classpath resources to more web applications than
intended (which would be the case if you put it in CATALINA_HOME/lib).
- Would allow deployers to not have to modify the web.xml and place the
classpath resource in WEB-INF/classes or WEB-INF/lib.
- Would prevent developers from having to code using absolute filenames.

First of all, is a feature similar to what I'm suggesting available in
Tomcat? If not, what do you think of such a feature request?

Thanks.



lightbulb432 wrote:
> 
> When deploying a WAR file whose code uses information stored in classpath
> configuration resources, where should you store these configuration files
> if outside of the WAR file?
> 
> If you want to keep these configuration files outside of the WAR file to
> make for easier deployment in multiple environments, isn't the only other
> classpath available to Tomcat within its own lib folder? And in that case,
> the configuration file would be available in all contexts. So where should
> such a file be stored (i.e. available to the webapp as a resource but not
> available to all contexts)?
> 
> Thanks.
> 

-- 
View this message in context: 
http://www.nabble.com/-OT--Where-to-store-classpath-resources-outside-of-WAR-tp14399810p14445789.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to