December 2003
Intermediate to advanced
764 pages
24h 58m
English
You can use JSP comments in JSP pages to describe what a scripting element or action is doing:
<%-- This is a comment --%>
All text between the start and stop tag is ignored by the JSP
container and isn’t included in the response. The
comment text can be anything except the character sequence
representing the closing tag: --%>.
Besides describing what’s going on in the JSP page, comments can also be used to “comment out” portions of the JSP page, for instance during testing:
<jsp:useBean id="user" class="com.mycompany.UserBean" /><%--<jsp:setProperty name="user" property="*" /><jsp:setProperty name="user" property="modDate"value="<%= new java.util.Date( ) %>" /><% boolean isValid = user.isValid( ); %>--%>
The action and scripting elements within the comment aren’t executed.
Read now
Unlock full access