1 package com.icesoft.faces.facelets; 2 3 import com.sun.facelets.tag.TagDecorator; 4 import com.sun.facelets.tag.Tag; 5 import org.apache.commons.logging.Log; 6 import org.apache.commons.logging.LogFactory; 7 8 17 public class JspTagDetector implements TagDecorator { 18 private static Log log = LogFactory.getLog(TagDecorator.class); 19 20 public JspTagDetector() { 21 super(); 22 } 23 24 27 public Tag decorate(Tag tag) { 28 if( log.isDebugEnabled() ) { 29 if( tag.getNamespace() != null && 30 tag.getNamespace().startsWith("http://java.sun.com/JSP/") ) 31 { 32 log.debug( 33 "A JSP tag has been detected in your Facelets page. "+ 34 "Facelets is an alternative to JSP, so it is not valid " + 35 "to use JSP tags or directives here. The JSP tag:\n" + tag); 36 } 37 } 38 return null; 39 } 40 } 41 | Popular Tags |