December 2003
Intermediate to advanced
764 pages
24h 58m
English
Besides JSP elements, notice that the easy.jsp page contains mostly regular HTML, highlighted in Example 5-2.
<%@ page contentType="text/html" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <html> <head> <title>JSP is Easy</title> </head> <body bgcolor="white"> <h1>JSP is as easy as ...</h1> <%-- Calculate the sum of 1 + 2 + 3 dynamically --%> 1 + 2 + 3 = <c:out value="${1 + 2 + 3}" /> </body> </html>
In JSP parlance, this is called template text. Everything that’s not a JSP element (i.e., not a directive, action or scripting element) is template text. Template text is sent to the browser as is. This means you can use JSP to generate any type of text-based output, such as XML, WML, or even plain text. The JSP container doesn’t care what the template text represents.
Read now
Unlock full access