tomcat relative paths settings
I have deployed a app on tomcat. Some of the lib开发者_开发问答raries 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.
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.
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 ?
精彩评论