The offending 
java.lang.Throwable
 describing the error that occurred is stored in the 
javax.ServletRequest
 instance for the client request using the 
putAttribute()
method, using the name  
javax.servlet.jsp.jspException
 . Names starting with 
the prefixes  
java
  and  
javax
  are reserved by the different specifications of the Java 
platform; the  
javax.servlet
  prefix is used by the Servlet and JSP specifications.
If the 
errorPage
 attribute of a 
page
 directive names a URL that refers to another JSP, and 
that JSP indicates that it is an error page (by setting the 
page 
directive's
 isErrorPage
attribute to 
true
) then the  
exception
  implicit scripting language variable of that page 
is initialized to the offending 
Throwable
 reference.
2.3
Comments
There are two types of comments in a JSP page: comments to the JSP page itself, 
documenting what the page is doing; and comments that are intended to appear in the 
generated document sent to the client.
Generating Comments in Output to Client
In order to generate comments that appear in the response output stream to the requesting 
client, the HTML and XML comment syntax is used, as follows:
These comments are treated as uninterpreted template text by the JSP container. If the 
generated comment is to have dynamic data, this can be obtained through an expression 
syntax, as in:
 more comments ...   >
JSP Comments
A JSP comment is of the form
<%   anything but a closing   %> ...   %>
The body of the content is ignored completely. Comments are useful for documentation but 
also to  comment out  some portions of a JSP page. Note that JSP comments do not nest.
Note that an alternative way to place a  comment  in JSP is to do so by using the comment 
mechanism of the scripting language. For example:
<% /** this is a comment ... **/ %>
Chapter 2
Standard Syntax and Semantics
38




JSP Web Hosting JavaServer Pages Specifications JSP Hosting




 
TotalRoute.net Business web hosting division of Vision Web Hosting Inc. All rights reserved.