Author: markt
Date: Mon Nov 25 13:59:04 2013
New Revision: 1545285
URL: http://svn.apache.org/r1545285
Log:
Fix logic error that meant that unpackWARs was ignored if a WAR failed to
deploy (since the Context is an instance of FailedContext in that case)
Modified:
tomcat/tc7.0.x/trunk/ (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1545284
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1545285&r1=1545284&r2=1545285&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java
Mon Nov 25 13:59:04 2013
@@ -709,12 +709,12 @@ public class ContextConfig implements Li
context.getWebappVersion());
String pathName = cn.getBaseName();
- boolean unpackWARs = true;
- if (host instanceof StandardHost &&
- context instanceof StandardContext) {
- unpackWARs = ((StandardHost) host).isUnpackWARs() &&
- ((StandardContext) context).getUnpackWAR() &&
- (docBase.startsWith(canonicalAppBase.getPath()));
+ boolean unpackWARs = docBase.startsWith(canonicalAppBase.getPath());
+ if (unpackWARs && host instanceof StandardHost) {
+ unpackWARs = ((StandardHost) host).isUnpackWARs();
+ if (unpackWARs && context instanceof StandardContext) {
+ unpackWARs = ((StandardContext) context).getUnpackWAR();
+ }
}
if (docBase.toLowerCase(Locale.ENGLISH).endsWith(".war") &&
!file.isDirectory() && unpackWARs) {
Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1545285&r1=1545284&r2=1545285&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon Nov 25 13:59:04 2013
@@ -165,6 +165,10 @@
Host's <code>deloyXML</code> attribute to <code>false</code>.
(markt)
</add>
+ <fix>
+ Correct a logic error that meant that unpackWARs was ignored and the
WAR
+ was always expanded if a WAR failed to deploy. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]