Attributes to the page directive

import 
Defines the Java import statements that’ll be added to the generated servlet class. You get some imports for free (by default): java.lang (duh), javax.servlet, javax.servlet.http, and javax.servlet.jsp.

isThreadSafe
Defines whether the generated servlet needs to implement the SingleThreadModel, which, as you know, is a Spectacularly Bad Thing. The default value is...”true”, which means, “My app is thread safe, so I do NOT need to implement SingleThreadModel, which I know is inherently evil.” The only reason to specifiy this attribute is if you need to set the attribute value to “false”, which means that you want the generated servlet to use the SingleThreadModel, but you never will.

contentType 
Defines the MIME type (and optional character encoding) for the JSP response. You know the default.

isELIgnored 
Defines whether EL expressions are ignored when this page is translated. We haven’t talked about EL yet; that’s coming in the next chapter. For now, just know that you might choose to ignore EL syntax in your page, and this is one of the two ways you can tell the Container.

isErrorPage
Defines whether the current page represents another JSP’s error page. The default value is “false”, but if it’s true, the page has access to the implicit exception object (which is a reference to the offending Throwable). If false, the implicit exception object is not available to the JSP.

errorPage 
Defines a URL to the resource to which uncaught Throwables should be sent. If you define a JSP here, then that JSP will have an isErrorPage=”true” attribute in its page directive.

language
Defines the scripting language used in scriptlets, expressions, and declarations. Right now, the only possible value is “java”, but the attribute is here because isn’t it just like those spec developers to be thinking of the future, when other languages might be used.

extends 
Defines the superclass of the class this JSP will become. You won’t use this unless you REALLY know what you’re doing—it overrides the class hierarchy provided by the Container.

session
Defines whether the page will have an implicit session object. The default value is “true”.

buffer 
Defines how buffering is handled by the implicit out object (reference to the JspWriter).

autoFlush
Defines whether the buffered output is flushed automatically. The default value is “true”.

info 
Defines a String that gets put into the translated page, just so that you can get it using the generated servlet’s inherited getServletInfo() method.

pageEncoding 
Defines the character encoding for the JSP. The default is “ISO-8859-1” (unless the contentType attribute already defines a character encoding, or the page uses XML Document syntax).