Tomcat / JSC Issue
Hi,
I've been able to run JSC apps on Tomcat, except for the following problem:
Everytime I have to redeploy a JSC 2 application on Tomcat (5.5x) , I have to stop the server, delete the WAR file and the app directory, and then restart the server and the drop the WAR file again.
Would appreciate help in resolution of this issue.
Thanks!
Haroon
[382 byte] By [
HaroonA] at [2007-11-26 9:54:51]

# 2
Found the solution. It is really a Tomcat issue, and nothing to do with JSC.
The problem is Tomcat locks up some jar files in the web-inf/lib directory, and so the undeploy can't happen. Therefore Tomcat has to be shutdown, and directory deleted before another version of the WAR file can be deployed.
Here is how I solved this problem:
I found that I have to add a file META-INF/context.xml with the following contents:
<Context antiJARLocking="true" antiResourceLocking="true">
</Context>
And everything (undeploy / deploy / hot-deploy) worked fine after that!
Regards
Haroon
# 4
There are two ways to solve this issue:
1). One way to apply it is to modify the file conf/context.xml in your TomCat install and change
<context> ... </context>
to
<context antiJARLocking="true" antiResourceLocking="true"> ... </context>
The above change will take care of all apps deployed.
2). Second way is to add a file META-INF/context.xml (inside each app that you deploy) with the following contents:
<Context antiJARLocking="true" antiResourceLocking="true">
</Context>
See the following blog for more info on this: http://blog.exis.com/colin/archives/2005/08/23/i-put-a-spell-on-you-because-you re-mine-aka-why-is-tomcat-holding-onto-jars/