Per Newgro
Per Newgro

Reputation: 93

How can i add files outside my war to tomcat webapp-classpath?

I would like to run my webapp on different servers in different configurations. So it's not possible for me to place my configs (for instance spring application-context.xml) into my webapp. I would like to place it the context folder of the app under %CATALINA_HOME/conf/myapp/localhost. But it seems that tomcat is not adding files from this location to the webapp classpath.

Is this configurable? And if how can i do this?

Upvotes: 1

Views: 1648

Answers (1)

Lyle
Lyle

Reputation: 3803

You should be able to add directories to the Tomcat classpath by adding them to shared.loader or common.loader property of catalina.properties

See also: this answer (Adding a directory to tomcat classpath)

or

Can I create a custom classpath on a per application basis in Tomcat

Upvotes: 1

Related Questions