tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r344456 - /tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java
Date Tue, 15 Nov 2005 22:45:38 GMT
Author: markt
Date: Tue Nov 15 14:45:34 2005
New Revision: 344456

URL: http://svn.apache.org/viewcvs?rev=344456&view=rev
Log:
Fix infinite recursion when calling EL function in same taglib from tabfile (bug 35276)
 - Patch provided by Kin-man

Modified:
    tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java

Modified: tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java
URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java?rev=344456&r1=344455&r2=344456&view=diff
==============================================================================
--- tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java
(original)
+++ tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java
Tue Nov 15 14:45:34 2005
@@ -459,7 +459,7 @@
 
     private void processChars() throws SAXException {
 
-        if (charBuffer == null) {
+        if (charBuffer == null || directivesOnly) {
             return;
         }
 
@@ -758,6 +758,11 @@
     public void startPrefixMapping(String prefix, String uri)
         throws SAXException {
         TagLibraryInfo taglibInfo;
+
+        if (directivesOnly && !(JSP_URI.equals(uri))) {
+            return;
+        }
+        
         try {
             taglibInfo = getTaglibInfo(prefix, uri);
         } catch (JasperException je) {
@@ -781,6 +786,14 @@
      * Receives notification of the end of a Namespace mapping. 
      */
     public void endPrefixMapping(String prefix) throws SAXException {
+
+        if (directivesOnly) {
+            String uri = pageInfo.getURI(prefix);
+            if (!JSP_URI.equals(uri)) {
+                return;
+            }
+        }
+
         pageInfo.popPrefixMapping(prefix);
     }
 



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


Mime
View raw message