![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e1057. Commenting a JSP PageTwo types of comments are allowed in a JSP page - - hidden and output comments. A hidden comment will not appear in the generated output whereas an output comment will appear in the generated output.This example shows a hidden comment: <%-- my hidden comment --%>A restriction for hidden comments is that the comment string cannot contain the character sequence -- .
This example shows an output comment: <!-- my output comment -->Similar to hidden comments, output comments cannot contain the character sequence -- .
Output comments can contain dynamic content:
<!-- This page was generated on <%= new java.util.Date() %> -->Output: <!-- This page was generated on Wed Jun 26 10:33:27 PDT 2002 -->
e1059. Implementing Conditional Content on a JSP Page e1060. Handling Unhandled Exceptions in a JSP Page
© 2002 Addison-Wesley. |