Learning JSTL Summary

xiaoxiao2021-03-06  38

Today I look at the following articles in IBM DeveloperWorks (China), although the version is not the latest, but still some gains, this will be extracted here.

JSTL Getting Started: Expression Language - Http://www-900.ibm.com/developerWorks/cn/java/J-JSTL0211/index.shtml

JSTL Getting Started: Discuss Core - http://www-900.ibm.com/developerWorks/cn/java/J-JSTL0318/

JSTL Getting Started: It is all - http: //www-900.ibm.com/developerWorks/cn/java/J-JSTL0415

JSTL Getting Starting, Part 4: Access SQL and XML content - http://www-900.ibm.com/developerworks/cn/java/J-JSTL0520/

JSTD (JSP Standard Tag Library) JSP Standard Tag Library

EL implicit object:

Category Identifier Description JSppageContextPageContext instance corresponds to the processing scope of the current page PageScope and the name and value associated with the name and value of the page scope property associated with the name and value of the requesting scope attribute associated with the MAP class Sessionscope and the session scope Properties Name and value associated with the MAP class ApplicationsCope, the name and value of the application scope attribute, the MAP class request parameter param is associated with the main value of the name storage request parameters, the MAP class paramvalues ​​requesting the parameters as the String array storage MAP Class Request Header by the MAP class headervalues ​​that stores the principal value of the Name Storage Request Headervalu as the MAP class cookieCookie stored by the String array cookie, the cookie, the cookie, the cookie, the cookie, the cookie, the cookie, the cookies, which is stored, Press Name Storage Web Application Context initialization parameter MAP class

Accessor:

Divided into "." And "[]".

"." More to access specific properties.

"[]" Is used to access arrays that implements the Java.util.List interface, such as "$ {Users [3]}" represents the 4th value of the UserS array (note the subscript from 0). At the same time, "[]" is also used to access the relevant identifier value of the Java.util.map interface object, such as "$ {Commands [" DIR "]}.

Another feature of the EL accessor is that when an access object is NULL, it does not throw an exception, then the value is NULL. For example, the Commands in $ {commands.dir} is NULL, then the last value is NULL.

Operator:

Category operator arithmetic operator , -, *, / (or div) and% (or mod) relational operators == (or EQ),! = (Or ne), <(or lt),> (or gt ), <= (Or le) and> = (or ge) logic operator && (or), || (or or or) and! (Or NOT) Verify Operator EMPTYEL operator priority (from top to bottom, from Left to right)

[],. () unary -, not,!, empty *, /, div,%, mod , binary - () <,>, <=,> ==, gt, le, ge ==,! = , EQ, Ne &&, And ||, OR introduces JSTL pseudo directive:

<% @ Taglib URI = "http://java.sun.com/jstl/core" prefix = "c"%>

Operation syntax

operation grammar

A useful instance: merge and to provide default variable

转载请注明原文地址:https://www.9cbs.com/read-118464.html

New Post(0)