Hacky fix to not break tomcat when java 1.5 is used in presence of the xercesImpl lib. 

Patch by: amitmanjhi
Review by: rjrjr (desk review)



git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@5916 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/dev/shell/tomcat/EmbeddedTomcatServer.java b/dev/core/src/com/google/gwt/dev/shell/tomcat/EmbeddedTomcatServer.java
index 5a86612..d4feab7 100644
--- a/dev/core/src/com/google/gwt/dev/shell/tomcat/EmbeddedTomcatServer.java
+++ b/dev/core/src/com/google/gwt/dev/shell/tomcat/EmbeddedTomcatServer.java
@@ -177,6 +177,15 @@
     //
     File topWorkDir = new File(System.getProperty("user.dir"));
 
+    /*
+     * set property explicitly so that addition of the xercesImpl lib, when java
+     * 1.5 is used, does not affect tomcat.
+     */
+    if ("1.5".equals(System.getProperty("java.specification.version"))) {
+      System.setProperty("javax.xml.parsers.DocumentBuilderFactory",
+          "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl");
+    }
+    
     // Tell Tomcat its base directory so that it won't complain.
     //
     String catBase = System.getProperty("catalina.base");