You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ad...@apache.org on 2013/03/09 08:08:43 UTC
svn commit: r1454667 - in /ofbiz/branches/release12.04: ./
framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java
Author: adrianc
Date: Sat Mar 9 07:08:42 2013
New Revision: 1454667
URL: http://svn.apache.org/r1454667
Log:
Merged rev 1389802 from trunk.
Fixed a bug introduced in rev 1334336 - do not throw an exception if the web.xml file does not exist.
Modified:
ofbiz/branches/release12.04/ (props changed)
ofbiz/branches/release12.04/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java
Propchange: ofbiz/branches/release12.04/
------------------------------------------------------------------------------
Merged /ofbiz/trunk:r1389802
Modified: ofbiz/branches/release12.04/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java?rev=1454667&r1=1454666&r2=1454667&view=diff
==============================================================================
--- ofbiz/branches/release12.04/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java (original)
+++ ofbiz/branches/release12.04/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java Sat Mar 9 07:08:42 2013
@@ -626,21 +626,25 @@ public class CatalinaContainer implement
}
final String webXmlFilePath = new StringBuilder().append("file:///").append(location).append("/WEB-INF/web.xml").toString();
-
- URL webXmlUrl;
+ boolean appIsDistributable = distribute;
+ URL webXmlUrl = null;
try {
webXmlUrl = FlexibleLocation.resolveLocation(webXmlFilePath);
} catch (MalformedURLException e) {
throw new ContainerException(e);
}
- Document webXmlDoc = null;
- try {
- webXmlDoc = UtilXml.readXmlDocument(webXmlUrl);
- } catch (Exception e) {
- throw new ContainerException(e);
+ File webXmlFile = new File(webXmlUrl.getFile());
+ if (webXmlFile.exists()) {
+ Document webXmlDoc = null;
+ try {
+ webXmlDoc = UtilXml.readXmlDocument(webXmlUrl);
+ } catch (Exception e) {
+ throw new ContainerException(e);
+ }
+ appIsDistributable = webXmlDoc.getElementsByTagName("distributable").getLength() > 0;
+ } else {
+ Debug.logInfo(webXmlFilePath + " not found.", module);
}
-
- boolean appIsDistributable = webXmlDoc.getElementsByTagName("distributable").getLength() > 0;
final boolean contextIsDistributable = distribute && appIsDistributable;
// configure persistent sessions