<c:url value= "http://baidu.com" var= "url" scope= "session"/>
The <c:url> tag has the following properties:
Attribute |
Description |
Required |
Default |
Value |
Root URL |
Yes |
None |
Context |
/Name of the local Web application after |
No |
Current application |
Var |
The name of the variable, the URL of the exposed handle |
No |
Print to Page |
Scope |
The scope of the variable exposes the processed URL |
No |
Page |
<c:forTokens>
Example 1:
<c:fortokens items= "Zara,nuha,roshy" delims= "," var= "name" >
<c:out value= "${name}"/><p>
</c:forTokens>
Example 2:
<c:fortokens var="str" items="${sourcestr}" delims= "|," varstatus="status" >
<c:out value="${status.count}" />//the iteration count of the current iteration starting at 1
<c:out value="${status.index}" />//the iteration index of the current iteration starting at 0
<c:if test="${status.last}">//is used to indicate whether the current iteration is the last iteration
<br> Total is divided into <c:out value="${status.count}" /> segment.
</c:if>
<c:out value="${status.index}" />//the iteration index of the current iteration starting at 0
</c:forTokens>
C:fortokens Property Description Table
650) this.width=650; "Src=" http://dl.iteye.com/upload/attachment/141597/1de1b27c-2f2a-3b39-8c80-b7929663a8ac.bmp "alt=" 1de1b27c-2f2a-3b39-8c80-b7929663a8ac.bmp "/>
Reference
Varstatus, which describe the current state of the iteration, the meanings of these properties are as follows:
Current: The item (in the collection) for this iteration.
Index: The current iteration of this iteration, starting at 0.
Count: The iteration count that is currently starting at 1 for this iteration.
First: Used to indicate whether the current iteration is the initial iteration, which is a Boolean type.
Last: Used to indicate whether the current iteration is the final iteration, which is a Boolean type.
The value of the Begin:begin property.
The value of the End:end property
The value of the Step:step property
Expressions for Jstl
Table 1. El Implicit Object
Category |
Identifier |
Describe |
Jsp |
pageContext |
PageContext instance corresponds to the processing of the current page |
Scope |
pageScope |
Class associated with the name and value of the page scope property Map |
requestScope |
Class associated with the name and value of the request scope property Map |
sessionScope |
Class associated with the name and value of a session-scoped property Map |
applicationScope |
Class associated with the name and value of the application scope property Map |
Request parameters |
param |
Class that stores the primary value of a request parameter by name Map |
paramValues |
Class that stores all the values of a request parameter as String an array Map |
Request Header |
header |
class for storing request header primary values by name Map |
headerValues |
class to store all the values of the request header as String an array Map |
Cookies |
cookie |
class to store the cookie that is included with the request by name Map |
Initialize parameters |
initParam |
Classes that store Web application context initialization parameters by name Map |
Table 2. El operator
Category |
Operator |
Arithmetic operators |
+ , - , * , / (or div ) and % /or mod |
Relational operators |
== (or eq ), != (or), (or), (or), (or) ne < lt > gt <= le and >= / ge or |
logical operators |
&& (or) and , || (or or ) and ! /or not |
Validation operators |
empty |
Table 3. El operator Precedence (top-to-bottom, left-to-right)
[] ,. |
() |
Unary,,, - not ! empty |
* ,,, / div % ,mod |
+ , binary- |
(),,,,,, <</code> > <= >= lt gt le ,ge |
== , != , eq ,ne |
&& 、and |
|| 、or |
This article is from the "Sign Up" blog, so be sure to keep this source http://6203973.blog.51cto.com/6193973/1616891
Jstl Common label collation <c:out><c:fortoken>, basic expression Ne,el