JSP-EL expression

1. EL syntax and usage

  EL(Expression Language)It is to make JSP easier to write.

  1、Grammatical structure

    ${The name attribute value of the domain object}

  2、Method of value acquisition

    From small to large: page, request, session, application

    If it is found, it shows, if it is not found, it continues to look up, and if it is not found in the application, it displays an empty string

    If you need to fetch the value of the specified domain scope, you can set the corresponding domain scope (pageScope, requestScope, session Scope, application Scope)

  3、Be careful

    elExpressions generally operate only on domain objects and are unable to manipulate variables.

 

Two, EL get parameters

  

 

Three. EL- entity class

  

 

Four. EL-List container

  

 

Five, EL-map set

   

 

Six, EL operation

  1、The two nonexistent domain object (numeric) is added with a value of 0.

    

 

  2、A existence (numerical type), a non additive, value being.

    

 

  3、The addition of non numeric strings will cause errors.

    

 

  

 

Leave a Reply

Your email address will not be published. Required fields are marked *