How do I add a directory to the classpath of the classloader assigned to a specific Tomcat 7 context?
I want my Java Servlet application to load a properties file external to the warfile from a directory in the classpath visible only to that servlet. For example, servlet context /appA
on host localhost
should load /etc/appA/application.properties
(Linux) or D:\configuration\appA\application.properties
(Windows) while servlet context /appB
on the same host should not have /etc/appA
(Linux) or D:\configuration\appA\
in its classpath.