May 2001
Intermediate to advanced
1088 pages
30h 13m
English
JSP supports an alternate XML-compliant syntax. Although the syntax is harder to read and write, it is machine-friendly and is intended for use in automated tools.
Every XML page requires a single root document tag. The root tag for JSP is <jsp:root>. In the <jsp:root> tag, you must include a reference to the JSP namespace.
Example:
<jsp:root xmlns:jsp="http://java.sun.com/products/jsp/dtd/jsp_1_1.dtd">
The <jsp:scriptlet> </jsp:scriptlet> tags enclose any number of lines that is interpreted as executable code. Any code within the <jsp:scriptlet> </jsp:scriptlet> tags is placed in the main service method of the JSP.
Example:
<jsp:scriptlet> for (int i=0; i < 10; i++) { out.println("Hello"); }</jsp:scriptlet> ...Read now
Unlock full access