![]() | |
Syntax For Java Server Pages Most of the HTML part, can be created using any standard WYSIWYG page editor. The only time you would want to use these Tags , would most probably be when you want to have Text Displayed Dynamically every time. That's when you can use these tags and directly display the values in a particular variable etc. Note that these shortcuts are not valid for XML files. Empty elements, tag constructs that have nothing between the start and end tags, can be shortened to one tag ending with />, as in this example: <!-- include tag with no body: --> White space is not usually significant, although you should make sure to put a space character between the opening tag and any attributes. For example: <%= myExpression %> is valid, <%=myExpression %> is not.
JSP Comments <%-- anything but a closing --%> ... --%> An alternative way to place a comment in a JSP is to use a Java comment. For example: <% /** this is a comment ... **/ %>
<!-- comments ... --> These comments are treated as uninterpreted template text by the JSP engine. If the generated comment is to have dynamic data, this can be obtained through an expression syntax, as in the following example: <!-- comments <%= expression %> more comments ... -->
|