jstl 或者el表达式如何读取request中的对象
2016-07-03 21:08
369 查看
我在一个超连接后加个参数如:
http://localhost:8080/test/testjstl.jsp?pid=001
此时在jsp页面中,获取jsp传过来的pid的参数值要使用 ${param.pid}
如果是在java代码中 ,使用了request.setAttribute(“attr”,”attrValue”);
那么在jsp中获取request中的参数值就要使用下面的代码
requestScope.attr或者{attr}
在表达式的test属性 中获取 session或request中的属性时,要使用empty或not empty
http://localhost:8080/test/testjstl.jsp?pid=001
此时在jsp页面中,获取jsp传过来的pid的参数值要使用 ${param.pid}
如果是在java代码中 ,使用了request.setAttribute(“attr”,”attrValue”);
那么在jsp中获取request中的参数值就要使用下面的代码
requestScope.attr或者{attr}
在表达式的test属性 中获取 session或request中的属性时,要使用empty或not empty
<c:if test="${not empty USER_INFO}"> <iframe src="${pageContext.request.contextPath}/myservice/NgCallServiceInfo.do" name="iframe" frameborder="0" width="728" height="276" class=""></iframe> </c:if>
相关文章推荐
- quick_sort <算法导论>实现
- 【一天一道LeetCode】#115. Distinct Subsequences
- 【一天一道LeetCode】#115. Distinct Subsequences
- UIProgressView
- APUE(5)---标准I/O库 (2)
- 复制UIView
- Android的UI布局
- UIPageController和UIScrollView结合使用
- Android UI控件学习笔记(二)
- 自定义 UISwitch
- 【Codeforces】-#222A-KShooshuns and Sequence(思维)
- FragmentTabHost 的使用+一个上架项目源码+一个UI项目源码
- kvm 中 Guest Is already in use 处理办法
- gradle 构建 Smack 报错:Can't find android.jar for 8 API. + steps for building android platform
- EasyUI学习总结(三)——EasyUI组件使用
- requirejs里的require方法
- hibernate uniqueResult方法
- 【CodeForces】222A - Shooshuns and Sequence(思维)
- LeetCode 334 Increasing Triplet Subsequence
- vue-cli需要的包