Update of /var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/pageflow
In directory james.mmbase.org:/tmp/cvs-serv404

Modified Files:
        IncludeTag.java 
Log Message:
write TOO DEEP recursion to page too


See also: 
http://cvs.mmbase.org/viewcvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/pageflow


Index: IncludeTag.java
===================================================================
RCS file: 
/var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/pageflow/IncludeTag.java,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -b -r1.87 -r1.88
--- IncludeTag.java     20 Jun 2008 16:05:48 -0000      1.87
+++ IncludeTag.java     24 Jul 2008 14:11:46 -0000      1.88
@@ -36,7 +36,7 @@
  *
  * @author Michiel Meeuwissen
  * @author Johannes Verelst
- * @version $Id: IncludeTag.java,v 1.87 2008/06/20 16:05:48 michiel Exp $
+ * @version $Id: IncludeTag.java,v 1.88 2008/07/24 14:11:46 michiel Exp $
  */
 
 public class IncludeTag extends UrlTag {
@@ -49,6 +49,8 @@
     public static final String INCLUDE_LEVEL_KEY = 
"org.mmbase.taglib.includeLevel";
 
     protected static int MAX_INCLUDE_LEVEL = -1;
+    private static final Xml xml = new Xml(Xml.ESCAPE);
+
 
 
     protected Attribute debugType       = Attribute.NULL;
@@ -266,7 +268,6 @@
             case Notfound.DEFAULT:
             case Notfound.MESSAGE:
                 if ("".equals(result)) {
-                    Xml xml = new Xml(Xml.ESCAPE);
                     result = "The requested resource '" + xml.transform(url) + 
"' is not available";
                 }
                 output = result;
@@ -318,7 +319,6 @@
             if (sc == null) log.error("Cannot retrieve ServletContext from 
PageContext");
 
             if (! 
ResourceLoader.getWebRoot().getResource(relativeUrl).openConnection().getDoInput())
 {
-                Xml xml = new Xml(Xml.ESCAPE);
                 handleResponse(404, "No such resource " + 
xml.transform(relativeUrl), relativeUrl);
             } else {
                 HttpServletRequestWrapper requestWrapper   = new 
HttpServletRequestWrapper(req);
@@ -506,7 +506,10 @@
                         internal(bodyContent, includedServlet, request, 
response);
                     }
                 } else {
-                    log.error("TOO DEEP mm:include recursion (" + 
includedServlet + ")");
+                    log.warn("TOO DEEP mm:include recursion (" + 
includedServlet + "), " + includeLevel + ">=" + MAX_INCLUDE_LEVEL);
+                    handleResponse(200,
+                                   "TOO DEEP mm:include recursion (" + 
xml.transform(includedServlet) + "), " + includeLevel + ">=" + 
MAX_INCLUDE_LEVEL, includedServlet);
+
                 }
                 // Reset include level and URI to previous state
                 includeLevel--;
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to