Dark Horse day06 EL expression operator & amp; 11 built-in Map objects, dark horse day06el expression

Source: Internet
Author: User

Dark Horse day06 EL expression operator & 11 built-in Map objects, dark horse day06el expression
1. I don't want to think much about EL expression operations. Let's look at the example directly ....

<% @ Page language = "java" import = "java. util. *" pageEncoding = "UTF-8" %> <! Doctype html public "-// W3C // dtd html 4.01 Transitional // EN"> Result:

2. 11 built-in objects of EL.

Do not confuse the nine built-in objects of jsp. The nine built-in objects of jsp are domain objects, while the 11 built-in objects of EL are corresponding map. A set is displayed instantly.

Get common development objects: el has 11 built-in objects, which can be directly used in el without prior definition.
! PageContext -- with this feature, you can easily obtain the Nine hidden objects in the jsp page.

! Pagination -- Map composed of attributes in the page domain
! RequestScope -- Map composed of attributes in the request domain
! SessionScope -- Map composed of attributes in the session domain
! ApplicationScope -- Map composed of attributes in the application domain

! Param -- Map composed of all request parameters <String, String>
ParamValues -- Map composed of all request parameters <String, String []>

Header -- Map composed of all request headers <String, String>
HeaderValues -- Map composed of all request headers <String, String []>

! Cookie-Map composed of all cookie Information <String, Cookie>

InitParam -- the initialization parameters of all web applications constitute a Map
Case:

<% @ Page language = "java" import = "java. util. *" pageEncoding = "UTF-8" %> <! Doctype html public "-// W3C // dtd html 4.01 Transitional // EN"> Running result:



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.