jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sh...@apache.org
Subject cvs commit: jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/xml ParseSupport.java TransformSupport.java
Date Mon, 29 Apr 2002 19:39:43 GMT
shawn       02/04/29 12:39:43

  Modified:    standard/src/org/apache/taglibs/standard/resources
                        Resources.properties
               standard/src/org/apache/taglibs/standard/tag/common/xml
                        ParseSupport.java TransformSupport.java
  Log:
  Improved error handling for unresolved entities, per enhancement request
  #8383 in bugzilla.
  
  Revision  Changes    Path
  1.31      +2 -0      jakarta-taglibs/standard/src/org/apache/taglibs/standard/resources/Resources.properties
  
  Index: Resources.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/resources/Resources.properties,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- Resources.properties	24 Apr 2002 22:14:24 -0000	1.30
  +++ Resources.properties	29 Apr 2002 19:39:43 -0000	1.31
  @@ -245,6 +245,8 @@
   TRANSFORM_SOURCE_UNRECOGNIZED=\
       <transform> encountered an unknown type while processing 'xmlText' attribute
   
  +UNABLE_TO_RESOLVE_ENTITY=\
  +    Could not resolve entity reference: "{0}"
   
   #########################################################################
   # JSTL core TLV messages
  
  
  
  1.5       +7 -1      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/xml/ParseSupport.java
  
  Index: ParseSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/xml/ParseSupport.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ParseSupport.java	17 Apr 2002 12:42:39 -0000	1.4
  +++ ParseSupport.java	29 Apr 2002 19:39:43 -0000	1.5
  @@ -292,7 +292,9 @@
   	    if (systemId.startsWith("/")) {
   	        s = ctx.getServletContext().getResourceAsStream(systemId);
   	        if (s == null)
  -		    throw new FileNotFoundException(systemId);
  +		    throw new FileNotFoundException(
  +			Resources.getMessage("UNABLE_TO_RESOLVE_ENTITY",
  +			 systemId));
   	    } else {
   		String pagePath =
   		    ((HttpServletRequest) ctx.getRequest()).getServletPath();
  @@ -300,6 +302,10 @@
   		    pagePath.substring(0, pagePath.lastIndexOf("/"));
   		s = ctx.getServletContext().getResourceAsStream(
   		      basePath + "/" + systemId);
  +	        if (s == null)
  +		    throw new FileNotFoundException(
  +			Resources.getMessage("UNABLE_TO_RESOLVE_ENTITY",
  +			 systemId));
   	    }
   	    return new InputSource(s);
           }
  
  
  
  1.9       +6 -2      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/xml/TransformSupport.java
  
  Index: TransformSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/xml/TransformSupport.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TransformSupport.java	29 Apr 2002 16:31:43 -0000	1.8
  +++ TransformSupport.java	29 Apr 2002 19:39:43 -0000	1.9
  @@ -361,7 +361,9 @@
               if (href.startsWith("/")) {
                   s = ctx.getServletContext().getResourceAsStream(href);
                   if (s == null)
  -                    throw new TransformerException(href);
  +                    throw new TransformerException(
  +                        Resources.getMessage("UNABLE_TO_RESOLVE_ENTITY",
  +                         href));
               } else {
                   String pagePath =
                       ((HttpServletRequest) ctx.getRequest()).getServletPath();
  @@ -370,7 +372,9 @@
                   s = ctx.getServletContext().getResourceAsStream(
                         basePath + "/" + href);
   		if (s == null)
  -		    throw new TransformerException(href);
  +		    throw new TransformerException(
  +                        Resources.getMessage("UNABLE_TO_RESOLVE_ENTITY",
  +                         href));
               }
               return new StreamSource(s);
           }
  
  
  

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


Mime
View raw message