user191207
user191207

Reputation: 5

tomcat relative paths settings

I have deployed a app on tomcat. Some of the libraries used by the app use relative paths to resources. Therefore, they search the resources in TOMCAT-HOME/relative-path. I can not create links nor copy resources to TOMCAT-HOME folder. Also I can not change the code of the libraries and use application context. Can I somewhere in Tomcat configuration specify the "working directory" for this app alone. I've tried using Context container, but I can not get my head around it. Thanks.

Upvotes: 0

Views: 3629

Answers (2)

Piyush Mattoo
Piyush Mattoo

Reputation: 16095

You need something like this inside your server.xml

<Context cachingAllowed="false" docBase="C:\ProgramFiles\ApacheSoftwareFoundation\apache-tomcat-5.5.29\temp" path="/tmpimages" privileged="true">
  </Context>

and use /tmpimages inside your source code.

Upvotes: 1

Cookies
Cookies

Reputation: 685

From the question you have asked , i can understand that you have problems accessing the TOMCAT-HOME folder . Why dont you try adding a ../ in front of all the paths that wants to access the TOMCAT-HOME folder ?

Upvotes: 0

Related Questions