December 2000
Intermediate to advanced
574 pages
17h 3m
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 tags is ignored by the JSP
container and is not 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 are not executed.
Read now
Unlock full access