El Expression-4

Source: Internet
Author: User
Tags arithmetic arithmetic operators

PageContext

PageContext obtain additional information about user requirements or pages.

${pagecontext.request.querystring} Gets the requested argument string

${pagecontext.request.requesturl} Gets the requested URL, but does not include the request's argument string

${pagecontext.request.contextpath} The name of the Web application of the service

${pagecontext.request.method} Method of getting HTTP (get, POST)

${pagecontext.request.protocol} Get the protocol used (http/1.1, http/1.0)

${pagecontext.request.remoteuser} Get user name

${PAGECONTEXT.REQUEST.REMOTEADDR} Get the IP address of the user

${pagecontext.session.new} to determine if the session is a new

${pagecontext.session.id} Gets the ID of the session

${pagecontext.servletcontext.serverinfo} access to host-side service information

Three, El operator

1. There are five arithmetic operators: + 、-、 * or $,/or div,% or mod

2. There are six relational operators: = = or EQ,! = or NE, < or LT, > or GT, <= or LE, >=, or GE

3. The logical operator has three:&& or an and, | | Or,!, or not

4. There are three other operators: the empty operator, the condition operator, the () operator

The most commonly used expressions:

empty judgment : ${empty Param.name}

ternary operation : ${a? B:C}

arithmetic Operation : ${a* (B+c)}

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.