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/compiler JspUtil.java
Date Tue, 15 Oct 2002 22:34:47 GMT
luehe       2002/10/15 15:34:47

  Modified:    jasper2/src/share/org/apache/jasper/compiler JspUtil.java
  Log:
  removed redundant code
  
  Revision  Changes    Path
  1.19      +3 -61     jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspUtil.java
  
  Index: JspUtil.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspUtil.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- JspUtil.java	9 Oct 2002 22:46:41 -0000	1.18
  +++ JspUtil.java	15 Oct 2002 22:34:46 -0000	1.19
  @@ -77,17 +77,7 @@
   import org.apache.jasper.JasperException;
   import org.apache.jasper.logging.Logger;
   
  -import org.w3c.dom.*;
  -import javax.xml.parsers.DocumentBuilder;
  -import javax.xml.parsers.DocumentBuilderFactory;
  -import javax.xml.parsers.ParserConfigurationException;
   import org.xml.sax.Attributes;
  -import org.xml.sax.EntityResolver;
  -import org.xml.sax.ErrorHandler;
  -import org.xml.sax.SAXException;
  -import org.xml.sax.SAXParseException;
  -import org.xml.sax.InputSource;
  -import org.xml.sax.helpers.AttributesImpl;
   
   // EL interpreter (subject to change)
   import javax.servlet.jsp.el.ExpressionEvaluator;
  @@ -115,8 +105,6 @@
       private static final String OPEN_EXPR_XML  = "%=";
       private static final String CLOSE_EXPR_XML = "%";
   
  -    private static ErrorHandler errorHandler = new MyErrorHandler();
  -    private static EntityResolver entityResolver = new MyEntityResolver();
       private static int tempSequenceNumber = 0;
       private static ExpressionEvaluatorImpl expressionEvaluator = 
           new ExpressionEvaluatorImpl( null );
  @@ -728,52 +716,6 @@
           public Class[] getParameterTypes() {
               return this.parameterTypes;
           }    
  -    }
  -}
  -
  -class MyEntityResolver implements EntityResolver {
  -    public InputSource resolveEntity(String publicId, String systemId)
  -	throws SAXException
  -    {
  -	for (int i=0; i<Constants.CACHED_DTD_PUBLIC_IDS.length; i++) {
  -	    String cachedDtdPublicId = Constants.CACHED_DTD_PUBLIC_IDS[i];
  -	    if (cachedDtdPublicId.equals(publicId)) {
  -		String resourcePath = Constants.CACHED_DTD_RESOURCE_PATHS[i];
  -		InputStream input =
  -		    this.getClass().getResourceAsStream(resourcePath);
  -		if (input == null) {
  -		    throw new SAXException(
  -                        Constants.getString("jsp.error.internal.filenotfound", 
  -					    new Object[]{resourcePath}));
  -		}
  -		InputSource isrc =
  -		    new InputSource(input);
  -		return isrc;
  -	    }
  -	}
  -	Constants.message("jsp.error.parse.xml.invalidPublicId",
  -				new Object[]{publicId}, Logger.ERROR);
  -        return null;
  -    }
  -}
  -
  -class MyErrorHandler implements ErrorHandler {
  -    public void warning(SAXParseException ex)
  -	throws SAXException
  -    {
  -	// We ignore warnings
  -    }
  -
  -    public void error(SAXParseException ex)
  -	throws SAXException
  -    {
  -	throw ex;
  -    }
  -
  -    public void fatalError(SAXParseException ex)
  -	throws SAXException
  -    {
  -	throw ex;
       }
   }
   
  
  
  

--
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