JSP Learning Note (ii): JSP four big scopes

Source: Internet
Author: User

First, the JSP's 9 large built-in objects (implicit), already new good object
(1) Examples of out:jspwriter, for example:
Out.print ("")
Out.println ("")
(2) Page: The current JSP page itself, similar to the use of this in Java, with less
(3) Pagecontext:page context object.
Javax.servlet.jsp.pageContext interface object, for example:
Pagecontext.setattribute ("x", 100)
Pagecontext.getattribute ("x")
(4) Request:Javax.servlet.http.HttpServletRequest interface object, for example:
Request.getparameter ("")
Request.setattribute ("W", "200")
Request.getattribute ("W")
(5) Response:Javax.servlet.http.HttpServletRequest interface object, for example:
Response.sendredirect ("")
(6) Session:Javax.servlet.http.HttpSession interface object, for example:
Session.setattribute ("Y", "300")
Session.getattribute ("Y")
(7) Aplication:servletcontext examples, for example:
Aplication.setattribute ("Z", "400")
Aplication.getattribute ("Z")
(8) Config:servletconfig Example

(9) Exception:servletexception Example


Second, the JSP four big scope:

The concrete usage still is in the actual application experience and the study ha. If there are inappropriate places, we look forward to the point and exchange of learning with you.

JSP Learning Note (ii): JSP four big scopes

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.