tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu...@apache.org
Subject cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/xmlparser ParserUtils.java
Date Wed, 09 Oct 2002 16:47:31 GMT
luehe       2002/10/09 09:47:31

  Modified:    jasper2/src/share/org/apache/jasper/xmlparser
                        ParserUtils.java
  Log:
  Removed dead code
  
  Revision  Changes    Path
  1.5       +1 -96     jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/xmlparser/ParserUtils.java
  
  Index: ParserUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/xmlparser/ParserUtils.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ParserUtils.java	16 Jul 2002 19:30:53 -0000	1.4
  +++ ParserUtils.java	9 Oct 2002 16:47:31 -0000	1.5
  @@ -124,17 +124,6 @@
   
       // --------------------------------------------------------- Public Methods
   
  -
  -    /**
  -     * Return the class loader used to access our XML parser.
  -     */
  -//     public ClassLoader getClassLoader() {
  -
  -//         return (this.classLoader);
  -
  -//     }
  -
  -
       /**
        * Parse the specified XML document, and return a <code>TreeNode</code>
        * that corresponds to the root node of the document tree.
  @@ -154,34 +143,12 @@
           try {
               DocumentBuilderFactory factory =
                   DocumentBuilderFactory.newInstance();
  -            /*
  -            Class clazz =
  -             classLoader.loadClass("javax.xml.parsers.DocumentBuilderFactory");
  -            System.out.println("Loaded DBF from:");
  -            System.out.println(clazz.getClassLoader());
  -            Method method = clazz.getMethod("newInstance", new Class[0]);
  -            DocumentBuilderFactory factory = (DocumentBuilderFactory)
  -                method.invoke(null, new Object[0]);
  -            */
               factory.setNamespaceAware(true);
               factory.setValidating(validating);
               DocumentBuilder builder = factory.newDocumentBuilder();
               builder.setEntityResolver(entityResolver);
               builder.setErrorHandler(errorHandler);
               document = builder.parse(is);
  -            //System.out.println("Parsing " + uri );
  -            /*
  -        } catch (ClassNotFoundException ex) {
  -            throw new JasperException("CNFE: " + ex); // FIXME
  -        } catch (IllegalAccessException ex) {
  -            throw new JasperException("IACE: " + ex); // FIXME
  -        } catch (IllegalArgumentException ex) {
  -            throw new JasperException("IARE: " + ex); // FIXME
  -        } catch (InvocationTargetException ex) {
  -            throw new JasperException("ITE: " + ex); // FIXME
  -        } catch (NoSuchMethodException ex) {
  -            throw new JasperException("NSME: " + ex); // FIXME
  -            */
   	} catch (ParserConfigurationException ex) {
               throw new JasperException
                   (Constants.getString("jsp.error.parse.xml",
  @@ -306,71 +273,10 @@
           (ClassLoader parentLoader) {
   
           ParserUtils parserUtils = null;
  -        /*
  -        try {
  -            Class clazz = parentLoader.loadClass
  -                ("org.apache.jasper.xmlparser.ParserUtils");
  -            parserUtils = (ParserUtils) clazz.newInstance();
  -            System.out.println("ParserUtils loaded by ClassLoader:\r\n" +
  -                               parserUtils.getClass().getClassLoader());
  -            parserUtils.setClassLoader(createClassLoader(parentLoader));
  -        } catch (ClassNotFoundException e) {
  -            System.out.println("createParserUtils:  ClassNotFoundException");
  -            e.printStackTrace(System.out);
  -        } catch (IllegalAccessException e) {
  -            System.out.println("createParserUtils:  IllegalAccessException");
  -            e.printStackTrace(System.out);
  -        } catch (InstantiationException e) {
  -            System.out.println("createParserUtils:  InstantiationException");
  -            e.printStackTrace(System.out);
  -        } catch (MalformedURLException e) {
  -            System.out.println("createParserUtils:  MalformedURLException");
  -            e.printStackTrace(System.out);
  -        }
  -        */
           parserUtils = new ParserUtils();
           parserUtils.setClassLoader(parentLoader);
           return (parserUtils);
       }
  -
  -
  -    /**
  -     * Construct (if necessary) and return a class loader that has been
  -     * configured with the specified parent class loader, and repositories
  -     * as needed to access the required XML parser.
  -     *
  -     * @param parentLoader The web application class loader
  -     *
  -     * @exception MalformedURLException if we cannot create a valid URL for
  -     *  one of the required repositories
  -     */
  -    /* This  doesn't work.
  -      
  -      public synchronized static ClassLoader createClassLoader
  -        (ClassLoader parentLoader) throws MalformedURLException {
  -
  -        // Return any existing class loader for this web application
  -        URLClassLoader classLoader = (URLClassLoader)
  -            classLoaders.get(parentLoader);
  -        if (classLoader != null)
  -            return (classLoader);
  -
  -        // Construct, cache, and return a new class loader
  -        URL urls[] = new URL[2]; // FIXME
  -        urls[0] = new URL("file:///classes/jaxp.jar");
  -        urls[1] = new URL("file:///classes/crimson.jar");
  -        classLoader = new URLClassLoader(urls, parentLoader);
  -        classLoaders.put(parentLoader, classLoader);
  -        System.out.println("PUF:  createClassLoader:\r\n" + classLoader);
  -        urls = classLoader.getURLs();
  -        for (int i = 0; i < urls.length; i++)
  -            System.out.println("PUF:    url=" + urls[i]);
  -        return (classLoader);
  -
  -    }
  -    */
  -
  -
   }
   
   
  @@ -393,7 +299,6 @@
   		}
   		InputSource isrc =
   		    new InputSource(input);
  -                //System.out.println("Resolve entity "  + publicId + " " + systemId + "
" + resourcePath);
   		return isrc;
   	    }
   	}
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message