You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by sp...@apache.org on 2007/03/20 15:33:58 UTC

svn commit: r520407 - /geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java

Author: sppatel
Date: Tue Mar 20 07:33:58 2007
New Revision: 520407

URL: http://svn.apache.org/viewvc?view=rev&rev=520407
Log:
jaxws workaround fails for inplace deployment in tomcat, check for web.xml in inPlace location before trying to create, also mkdirs to avoid exception in filewriter if WEB-INF dir does not exist

Modified:
    geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java

Modified: geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java?view=diff&rev=520407&r1=520406&r2=520407
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java (original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java Tue Mar 20 07:33:58 2007
@@ -295,7 +295,10 @@
          * until Tomcat fixes that bug.
          */
         File webXml = new File(moduleContext.getBaseDir(), "/WEB-INF/web.xml");
-        if (!webXml.exists()) {
+        File inPlaceDir = moduleContext.getInPlaceConfigurationDir();
+        boolean webXmlExists = (inPlaceDir != null && new File(inPlaceDir,"/WEB-INF/web.xml").exists()) || webXml.exists();
+        if (!webXmlExists) {
+        	webXml.getParentFile().mkdirs();
             try {
                 FileWriter outFile = new FileWriter(webXml);