Instructions for [Java EE] jsp

Source: Internet
Author: User

JSP directive:jsp Instruction (directive) is designed for the JSP engine, they do not directly produce any visible output, Instead, tell the engine how to handle the JSP

Other parts of the page

Page instruction on the header

<% @page import= "Org.apache.jasper.tagplugins.jstl.core.Out"%>

<% @page import= "Java.util.Date"%>

<%@ page language= "java" contenttype= "text/html; Charset=utf-8 "

pageencoding= "Utf-8"%>

Configuration Error page:

<%@ page errorpage= "500.jsp"%>

Xml

<error-page>

<error-code>500</error-code>

<location>/500.jsp</location>

</error-page>

<error-page>

<error-code>404</error-code>

<location>/404.jsp</location>

</error-page>

Solve Chinese garbled characters:

<%@ page language= "java" contenttype= "text/html; Charset=utf-8 "

pageencoding= "Utf-8"%>

The page contains:

<% @include file= "footer.jsp"%>

The nine implicit objects of the JSP:

After the JSP page is translated into a Servlet , the nine objects that are automatically defined for us in the service method

Page object, current Servlet Object

Config

Application

Response

Request

Session

Out

PageContext

Final Javax.servlet.jsp.PageContext PageContext;

Javax.servlet.http.HttpSession session = NULL;

Final Javax.servlet.ServletContext Application;

Final Javax.servlet.ServletConfig config;

Javax.servlet.jsp.JspWriter out = null;

Final Java.lang.Object page = this;

Javax.servlet.jsp.JspWriter _jspx_out = null;

Javax.servlet.jsp.PageContext _jspx_page_context = null;

Instructions for [Java EE] jsp

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.