Aub*_*ine 5 variables session scope jstl
任务是通过JSTL从会话中检索参数.会话参数名称为"programId".
我试过了:
<c:if test="${sessionScope.programId != null}" >
please execute
</c:if>
Run Code Online (Sandbox Code Playgroud)
然后我尝试了:
<c:if test="${sessionScope:programId != null}" > please execute </c:if>
Run Code Online (Sandbox Code Playgroud)
我得到:函数applicationScope:programId未定义
最重要的是我有:
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
Run Code Online (Sandbox Code Playgroud)
Oracle有以下示例:
http://docs.oracle.com/javaee/1.4/tutorial/doc/JSTL5.html
<c:if test="${applicationScope:booklist == null}" >
<c:import url="${initParam.booksURL}" var="xml" />
<x:parse doc="${xml}" var="booklist" scope="application" />
</c:if>
Run Code Online (Sandbox Code Playgroud)
其中applicationScope可以通过sessionScope进行交换.
再次"琐事"的复杂性让我疯狂.为什么公司.例子从来没有用?
感谢你们,
您正在阅读错误的教程页面.该<c:xxx>标签也不会属于JSTL XML标记库,支持XPath语法.相反,它属于JSTL核心标签库为其适当的教程页面在这里.
您需要使用常规${bean.property}符号.
<c:if test="${applicationScope.booklist == null}">
<c:import url="${initParam.booksURL}" var="xml" />
<x:parse doc="${xml}" var="booklist" scope="application" />
</c:if>
Run Code Online (Sandbox Code Playgroud)
在普通EL(不是XPath!)语法中,:标识EL函数的开始.又见JSTL功能的taglib几EL功能例子,对于这些教程页面在这里.
| 归档时间: |
|
| 查看次数: |
53084 次 |
| 最近记录: |