Author: mmarinschek
Date: Wed Oct 5 01:38:14 2005
New Revision: 295017
URL: http://svn.apache.org/viewcvs?rev=295017&view=rev
Log:
ignoring not existing web.xml
Modified:
myfaces/share/trunk/src/java/org/apache/myfaces/webapp/webxml/WebXmlParser.java
Modified: myfaces/share/trunk/src/java/org/apache/myfaces/webapp/webxml/WebXmlParser.java
URL: http://svn.apache.org/viewcvs/myfaces/share/trunk/src/java/org/apache/myfaces/webapp/webxml/WebXmlParser.java?rev=295017&r1=295016&r2=295017&view=diff
==============================================================================
--- myfaces/share/trunk/src/java/org/apache/myfaces/webapp/webxml/WebXmlParser.java (original)
+++ myfaces/share/trunk/src/java/org/apache/myfaces/webapp/webxml/WebXmlParser.java Wed Oct
5 01:38:14 2005
@@ -32,6 +32,7 @@
import javax.xml.parsers.DocumentBuilderFactory;
import java.io.IOException;
import java.io.InputStream;
+import java.net.URL;
/**
* @author Manfred Geiler (latest modification by $Author$)
@@ -85,6 +86,13 @@
db.setErrorHandler(new MyFacesErrorHandler(log));
InputSource is = createContextInputSource(null, WEB_XML_PATH);
+
+ if(is==null)
+ {
+ URL url = _context.getResource(WEB_XML_PATH);
+ log.debug("No web-xml found at : "+(url==null?" null ":url.toString()));
+ return _webXml;
+ }
Document document = db.parse(is);
|