tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pier...@locus.apache.org
Subject cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler TagLibrariesGlobal.java TagLibraryInfoImpl.java
Date Thu, 02 Nov 2000 01:08:43 GMT
pierred     00/11/01 17:08:42

  Modified:    jasper/src/share/org/apache/jasper/compiler
                        TagLibrariesGlobal.java TagLibraryInfoImpl.java
  Log:
  Simply log an error instead of throwing an exception
  when problem processing a TLD.
  Also give the name of the TLD in the error message.
  
  Revision  Changes    Path
  1.3       +12 -6     jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibrariesGlobal.java
  
  Index: TagLibrariesGlobal.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibrariesGlobal.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TagLibrariesGlobal.java	2000/11/02 00:43:20	1.2
  +++ TagLibrariesGlobal.java	2000/11/02 01:08:41	1.3
  @@ -74,8 +74,8 @@
   
   import org.apache.jasper.Constants;
   import org.apache.jasper.JasperException;
  +import org.apache.jasper.logging.Logger;
   
  -
   /**
    * A container for all tag libraries that are defined "globally"
    * for the web application.
  @@ -142,10 +142,12 @@
       {
           // Parse web.xml
   	InputStream is = ctxt.getResourceAsStream(WEB_XML);
  +
   	if (is == null) {
  -	    throw new JasperException(
  -		Constants.getString("jsp.error.internal.filenotfound", 
  -				    new Object[]{WEB_XML}));
  +	    Constants.message("jsp.error.internal.filenotfound", 
  +			      new Object[]{WEB_XML},
  +			      Logger.WARNING);
  +	    return;
   	}
   	Document webtld =
   	    JspUtil.parseXMLDoc(WEB_XML, is);
  @@ -271,8 +273,12 @@
       {
   	Document tld = JspUtil.parseXMLDoc(resourcePath, in);
           NodeList list = tld.getElementsByTagName("taglib");
  -        if (list.getLength() != 1)
  -            throw new JasperException(Constants.getString("jsp.error.more.than.one.taglib"));
  +        if (list.getLength() != 1) {
  +	    Constants.message("jsp.error.more.than.one.taglib",
  +			      new Object[]{resourcePath},
  +			      Logger.ERROR);
  +	    return null;
  +	}
   
           Element elem = (Element)list.item(0);
           list = elem.getChildNodes();
  
  
  
  1.12      +6 -4      jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java
  
  Index: TagLibraryInfoImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- TagLibraryInfoImpl.java	2000/11/01 20:25:09	1.11
  +++ TagLibraryInfoImpl.java	2000/11/02 01:08:41	1.12
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
1.11 2000/11/01 20:25:09 pierred Exp $
  - * $Revision: 1.11 $
  - * $Date: 2000/11/01 20:25:09 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
1.12 2000/11/02 01:08:41 pierred Exp $
  + * $Revision: 1.12 $
  + * $Date: 2000/11/02 01:08:41 $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -267,7 +267,9 @@
           NodeList list = tld.getElementsByTagName("taglib");
   
           if (list.getLength() != 1)
  -            throw new JasperException(Constants.getString("jsp.error.more.than.one.taglib"));
  +            throw new JasperException(
  +                Constants.getString("jsp.error.more.than.one.taglib",
  +                                    new Object[]{uri}));
   
           Element elem = (Element) list.item(0);
           list = elem.getChildNodes();
  
  
  

Mime
View raw message