jsp page directive

page instruction is an instruction for the current page, the page of instructions used with 8:

1. <% @ Page language = "java"%> JSP Container specify what language to compile, currently only supports JAVA language. The default is JAVA

2. <% @ Page extends = "mypackage.myclass"%> This JSP Servlet-defined page generated which is inherited. Generally no need to provide, by default, jsp pages default parent class is HttpJspBase.

3. Which Java API <% @ page import = "java.sql. *"%> Jsp pages used

4. <% @ Page errorPage = "error.jsp"%> Set exception appears to be the jsp page to page, if not set, the container will use the current page displays an error message

5. <% @ Page isErrorPage = "true"%> set this page is displayed as an error jsp pages, the default is false, if set to true, the page will generate an exception container objects in the current, and with the use of 4

. 6 <% @ page contentType = "text / html; charset = gb2312"%> settings page file type and encoding

7. <% @ Page isThreadSafe = "true"%> Set the container in a single-threaded or multi-threaded run the jsp page, the default is true, is multi-threaded. Set to false, places the single-threaded run jsp page

8. <% @ Page session = "true"%> Set whether the jsp page can use session objects (jsp built-in objects, created for the web container), the default is true, can the session. Set to false, with no to

Published 21 original articles · won praise 6 · views 550

Guess you like

Origin blog.csdn.net/weixin_43862596/article/details/104093242