" displays data in jsp, which is equivalent to "<%=...%>"; 2. "" is used to save data, variables and objects; 3. "" is used to delete variables within the specified scope."/> " displays data in jsp, which is equivalent to "<%=...%>"; 2. "" is used to save data, variables and objects; 3. "" is used to delete variables within the specified scope.">

Home  >  Article  >  Java  >  What does jsp c: mean?

What does jsp c: mean?

藏色散人
藏色散人Original
2019-05-20 11:18:235518browse

The ":c" tag in jsp is the core tag library in jstl. How to use it: 1. "460bc2a84a9d80a4ca4e609feaa76aeb" displays data in jsp, which is equivalent to "0553bdf104956362828f416e47f66e9e"; 2. "99c48a975ea0aa6890fdc4cc57d09a26" is used to save data, variables and objects; 3. "877f2778b3e33901451e8fad5187af59" is used to delete variables within the specified scope.

What does jsp c: mean?

##Use of c tags in jsp

The c tag is the core tag library in jstl

1.460bc2a84a9d80a4ca4e609feaa76aeb: Displaying data in jsp is equivalent to dae4c36fc931dafe9ee9ed85cc9291c2

Syntax:

<c:out value="值" escapeXml="{true|false}" default="默认值">

escapeXml: Whether to escape the characters "6745434bf92a2979d589ede8e8e7bea9", "&", " ' ", " " "

default: Display when the value is empty

2.99c48a975ea0aa6890fdc4cc57d09a26: Used to save data, save variables and objects

Syntax:--Variable

<c:set value="值" var="变量名" scope="变量的作用域"></c:set>

--Object

 <c:set target="对象名" property=" 对象属性名" scope="变量的作用域"></c:set>

3.877f2778b3e33901451e8fad5187af59: Used to delete variables within the specified scope

Syntax:

<c:remove var="变量名" scope="作用域"/>

4.c15b85348bb0446c9878788d72d8f1e3 is used to handle exceptions that cause errors and save error information

Syntax:

<c:catch var="变量名"></c:catch>

5.d0d9bdab4076eea66045fa63123be3ee The judgment statement has no else function

Grammar:

<c:if test="${my eq &#39;dd&#39;}"></c:if>

6.4436be787af99f07ea780cfa8beb043f is equivalent to the switch statement in java used with c67f168fbaabaed338c344018064d87b and 4f0025edc9390e9c4378bf0fe8018e26

Grammar:

<c:choose>
<c:when test="${my eq &#39;w&#39;}"></c:when>
<c:when test="${my eq &#39;g&#39;}"></c:when>
<c:otherwise></c:otherwise>
</c:choose>

7.8f86ca20bf479ad0d2cad5e574c19d8a Equivalent to java’s for loop

Syntax:

<c:forEach items="${保存在作用域的变量名}" var="用来循环的名" varStatus="status" begin="开始" end="结束">
</c:forEach>
<c:forEach items="${infoList}" var="info" varStatus="status">
<c:if test="${status.index%4==0}"><tr></c:if>
<td>${info.id}</td>
<td>${info.type}</td>
<c:if test="${(status+1)%4==0}"</tr></c:if>
-------功能是循环四个后实现换行

8.cdb3805963f4844f4ce3a610412e3432

can be used Single label, jump to the specified page

<a href="<c:url value=&#39;top.jdp&#39;/>"

Set url

<c:url value="http://www.baidu.com" var="baidu"> 
<c:param name="name" value="宝宝"/>
<c:param name="age" value="29"/>
</c:url>

Finally form http://www.baidu.com?name='Baby'&age=29

9.ee8745f4240b31ad686f9abbc2e4e5fc Used to pass parameters to included or redirected pages

10.2ae5a643b4a81fc8fb5b985b58a0336cIterative output string

 <c:forTokens items="字符串" delims="分界符" var="变量名"
          varStatus="遍历状态名" begin="begin" end="end" step="sep">
            标签体     
    </c:forTokens>

11.2e7cd64b6af9a12ea19873b9d0eb65a5Redirect to a new URL

<c:redirect url="地址" context="上下文路径">
         <c:param/>标签 --------------可以不写
</c:redirect>

The above is the detailed content of What does jsp c: mean?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn