Comment tag ver. 1.4

    Custom JSP tag. Lets you comment (skip) any part of your JSP page. Any output from the commented body will be suppressed. For example:
 


<%@ taglib uri="taglib.tld" prefix="rem" %>

<rem:comment>
   ...
    all this code will be skipped
   ...
</rem:comment>

In the same time you may still execute the commented code. So it will let you for example create some objects, perform server-side actions etc. But all output will be still suppressed. For example:
 


<rem:comment execute="true">
   ...
    code will be executed, but without any output
   <%
    String s="12345";
    pageContext.setAttribute("s",s,pageContext.PAGE_SCOPE);
    out.println(s);
   %>
   ...
</rem:comment>
Object is:<%=pageContext.getAttribute("s",pageContext.PAGE_SCOPE)%>

Also you can dynamically switch on/switch off this tag depends on the value of attribute cond:
 


<rem:comment execute="true" cond="<%=A!=null%>">
   ...
   ...
</rem:comment>

Tags are:

comment

Body tag. Comments some part of your page. Attributes are:

1) execute Optional attribute. If this value is true commented code will be executed. Default value is false.
2) cond Optional attribute. Describes a boolean expression. Depends on this value the body will be commented or not. If this value is false than tag's body will be evaluated as is. Default value is true (comment).

for downloading:

Library: remtag.jar    Description: taglib.tld

 © Coldbeans      Comments?

See also Coldtags suite - the largest collection of custom JSP tags.

Also in Coldtags: