You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by vg...@apache.org on 2002/03/02 04:55:17 UTC

cvs commit: xml-cocoon2/src/java/org/apache/cocoon/servlet CocoonServlet.java

vgritsenko    02/03/01 19:55:17

  Modified:    src/java/org/apache/cocoon/servlet CocoonServlet.java
  Log:
  Override weblogic's parser
  
  Revision  Changes    Path
  1.15      +10 -1     xml-cocoon2/src/java/org/apache/cocoon/servlet/CocoonServlet.java
  
  Index: CocoonServlet.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/servlet/CocoonServlet.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- CocoonServlet.java	24 Feb 2002 11:10:58 -0000	1.14
  +++ CocoonServlet.java	2 Mar 2002 03:55:17 -0000	1.15
  @@ -118,7 +118,7 @@
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
    * @author <a href="mailto:leo.sutic@inspireinfrastructure.com">Leo Sutic</a>
  - * @version CVS $Id: CocoonServlet.java,v 1.14 2002/02/24 11:10:58 dims Exp $
  + * @version CVS $Id: CocoonServlet.java,v 1.15 2002/03/02 03:55:17 vgritsenko Exp $
    */
   public class CocoonServlet extends HttpServlet {
   
  @@ -200,6 +200,15 @@
   
           super.init(conf);
           String value;
  +
  +        // FIXME (VG): We shouldn't have to specify these. Need to override 
  +        // jaxp implementation of weblogic before initializing logger.
  +        // This piece of code is also required in the Cocoon class.
  +        value = System.getProperty("javax.xml.parsers.SAXParserFactory");
  +        if (value != null && value.startsWith("weblogic")) {
  +            System.setProperty("javax.xml.parsers.SAXParserFactory", "org.apache.xerces.jaxp.SAXParserFactoryImpl");
  +            System.setProperty("javax.xml.parsers.DocumentBuilderFactory", "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
  +        }
   
           this.servletContext = conf.getServletContext();
           this.appContext.put(Constants.CONTEXT_ENVIRONMENT_CONTEXT, new HttpContext(this.servletContext));
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org