⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 e1065. enabling the jstl expression language in a jsp page.txt

📁 这里面包含了一百多个JAVA源文件
💻 TXT
字号:
There are two versions of the JSTL: one that enables the JSTL expression language support and one that doesn't. JSTL expression language support replaces the expression JSP tag with a more convenient syntax. For example, the JSP expression: 
    <c_rt:if test='<%= request.getParameter("p") != null %>'>
        <%= request.getParameter("p") %>
    </c_rt:if>

would be written as 
    <c:if test="${param.p != null}">
        <c:out value="${param.p}" />
    </c:if>

with expression language support enabled. The expression language is currently available only in attribute values. Future versions will allow its use in template text. More detailed information about the expression language is available at http://www.jcp.org/aboutJava/communityprocess/first/jsr052/index.html. 
As mentioned in e1064 Using the Java Standard Tag Library (JSTL) in a JSP Page, there are four tag libraries that make up the JSTL. There are two versions of each of these libraries. That example declares the use of the four tag libraries that do not support the expression language. Here is an example that declares the use of the four tag libraries that do support the expression language: 

    <%-- Core with EL --%>
    <%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
    
    <%-- I18N Formatting with EL --%>
    <%@ taglib uri="/WEB-INF/tld/fmt.tld" prefix="fmt" %>
    
    <%-- SQL with EL --%>
    <%@ taglib uri="/WEB-INF/tld/sql.tld" prefix="sql" %>
    
    <%-- XML with EL --%>
    <%@ taglib uri="/WEB-INF/tld/x.tld" prefix="x" %>

Note that the taglib directives assume the TLD files are located in WEB-INF/tld. 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -