11.1 Creating Template Text

In most cases, a large percentage of your JSP document consists of static text (usually HTML), known as template text . In almost all respects, this HTML looks just like normal HTML, follows all the same syntax rules, and is simply "passed through" to the client by the servlet created to handle the page. Not only does the HTML look normal, it can be created by whatever tools you already are using for building Web pages. For example, we used Macromedia Dreamweaver for many of the JSP pages in this book.

There are two minor exceptions to the "template text is passed straight through" rule. First, if you want to have <% or %> in the output, you need to put <\% or %\> in the template text. Second, if you want a comment to appear in the JSP page but not in the resultant document, use

 
 <%--  JSP Comment  --%> 

HTML comments of the form

 
 <!--  HTML Comment  --> 

are passed through to the client normally.



Core Servlets and JavaServer Pages (Vol. 1.Core Technologies)
Core Servlets and Javaserver Pages: Core Technologies, Vol. 1 (2nd Edition)
ISBN: 0130092290
EAN: 2147483647
Year: 2002
Pages: 194

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net