Note that the explosion will not occur if the Host is
configured
so that .WARs are not exploded with a unpackWARs
attribute set to "false" to appBase which is usually webapps,
the web application
will be simply redeployed as a compressed archive.
n
unpackWARs
Should we unpack WAR files when auto-deploying applications in the
appBase directory?
http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/startup/HostConfig.html
http://www.scribd.com/doc/7430501/Tomcat-War-Deployment
?
Martin
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung.
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est
interdite. Ce message sert à l'information seulement et n'aura pas n'importe
quel effet légalement obligatoire. Étant donné que les email peuvent facilement
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité
pour le contenu fourni.
From: [email protected]
To: [email protected]
Date: Fri, 22 May 2009 14:29:02 -0400
Subject: different behavior in processing jar files in Tomcat 5.0.28 and Tomcat
6.0.18
Hi,
In the process of migrating an application from Tomcat 5.0.28 to Tomcat 6.0.18,
I’ve identified a different behavior in processing jar files between the two
versions. I’ve attached a small test application (testapp.war) that can be run
under both versions
to display the differences. I’ve also included the appropriate lines from the
log files of the two versions below.
Essentially, when running my Java code which calls method getResource(String
name) of class Class to find a resource that is part of a jar file, Tomcat
5.0.28 finds the jar file in the classpath and expands it in directory
jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/loader.
And then I can access the resource in the expanded jar file by calling the
getPath() method on the instance of the URL class returned by the
getResource(String name) method.
However, when running the same code with Tomcat 6.0.18, Tomcat finds the
resource in the jar file, but it does not expand the jar file under the
apache-tomcat-6.0.18/work/Catalina/localhost directory tree and therefore, I
cannot access the resource from
the jar file.
I’ve checked the Servlet Specification Version 2.4 (Tomcat 5) and Version 2.5
(Tomcat 6) to see if this should be the expected behavior under Tomcat 6, but
as far as I can tell, it should process jar files in the same was as Tomcat 5.
If anyone can let me know what the correct behavior should be for Tomcat 6, and
if there is a way that I can force Tomcat 6 to process jar files in the same
way as Tomcat 5, I would greatly appreciate it.
Thanks,
Pat
Tomcat 5.0.28:
-------------
~/opt/jakarta-tomcat-5.0.28/logs % cat
~/opt/jakarta-tomcat-5.0.28/logs/catalina.out | fgrep StartupServlet
2009-05-22_11:56 StartupServlet_init - Initializing servlet StartupServlet
2009-05-22_11:56 StartupServlet_init - url =
file:/usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/loader/queryDefns/
2009-05-22_11:56 StartupServlet_init - url.getPath() =
/usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/loader/queryDefns/
2009-05-22_11:56 StartupServlet_init - url.getFile() =
/usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/loader/queryDefns/
2009-05-22_11:56 StartupServlet_init - url.getProtocol() = file
2009-05-22_11:56 StartupServlet_processPath - pathName =
/usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/loader/queryDefns/
2009-05-22_11:56 StartupServlet_processPath - fileName = queryDefns
2009-05-22_11:56 StartupServlet_processPath - File queryDefns exists.
2009-05-22_11:56 StartupServlet_processPath - pathName =
/usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/loader/queryDefns/describeRawTables.xml
2009-05-22_11:56 StartupServlet_processPath - fileName = describeRawTables.xml
2009-05-22_11:56 StartupServlet_processPath - File describeRawTables.xml exists.
2009-05-22_11:56 StartupServlet_processFile - File describeRawTables.xml is a
file.
~/opt/jakarta-tomcat-5.0.28/logs %
~/opt/jakarta-tomcat-5.0.28/logs %
~/opt/jakarta-tomcat-5.0.28/logs % find
/usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp
/usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp
/usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/tldCache.ser
/usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/loader
/usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/loader/META-INF
/usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/loader/META-INF/MANIFEST.MF
/usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/loader/queryDefns
/usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/loader/queryDefns/describeRawTables.xml
~/opt/jakarta-tomcat-5.0.28/logs %
Tomcat 6.0.18:
-------------
~/apps/apache-tomcat-6.0.18/logs % cat
~/apps/apache-tomcat-6.0.18/log/catalina.out | fgrep StartupServlet
2009-05-22_12:27 StartupServlet_init - Initializing servlet StartupServlet
2009-05-22_12:27 StartupServlet_init - url =
jar:file:/usr/nlm/kss/apps/apache-tomcat-6.0.18/webapps/testapp/WEB-INF/lib/sample.jar!/queryDefns
2009-05-22_12:27 StartupServlet_init - url.getPath() =
file:/usr/nlm/kss/apps/apache-tomcat-6.0.18/webapps/testapp/WEB-INF/lib/sample.jar!/queryDefns
2009-05-22_12:27 StartupServlet_init - url.getFile() =
file:/usr/nlm/kss/apps/apache-tomcat-6.0.18/webapps/testapp/WEB-INF/lib/sample.jar!/queryDefns
2009-05-22_12:27 StartupServlet_init - url.getProtocol() = jar
2009-05-22_12:27 StartupServlet_processPath - pathName =
file:/usr/nlm/kss/apps/apache-tomcat-6.0.18/webapps/testapp/WEB-INF/lib/sample.jar!/queryDefns
2009-05-22_12:27 StartupServlet_processPath - fileName = queryDefns
2009-05-22_12:27 StartupServlet_processPath - File queryDefns DOES NOT exist.
~/apps/apache-tomcat-6.0.18/logs %
~/apps/apache-tomcat-6.0.18/logs %
~/apps/apache-tomcat-6.0.18/logs % find ../work/
../work/
../work/Catalina
../work/Catalina/localhost
../work/Catalina/localhost/UMLS08AB
../work/Catalina/localhost/UMLS08AB/SESSIONS.ser
../work/Catalina/localhost/manager
../work/Catalina/localhost/manager/org
../work/Catalina/localhost/manager/org/apache
../work/Catalina/localhost/manager/org/apache/jsp
../work/Catalina/localhost/manager/org/apache/jsp/_401_jsp.java
../work/Catalina/localhost/manager/org/apache/jsp/_401_jsp.class
../work/Catalina/localhost/manager/SESSIONS.ser
../work/Catalina/localhost/host-manager
../work/Catalina/localhost/host-manager/SESSIONS.ser
../work/Catalina/localhost/RegService
../work/Catalina/localhost/RegService/SESSIONS.ser
../work/Catalina/localhost/testapp
~/apps/apache-tomcat-6.0.18/logs %
Patricia T. Guimaraes
NIH/NLM/OCCS/MLB
SCI Contractor
E-mail: [email protected]
Phone: 301-496-3615
Building 38A, Room 2N-218
_________________________________________________________________
Hotmail® has ever-growing storage! Don’t worry about storage limits.
http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage1_052009