jstl 或者el表达式如何读取request中的对象

 1. 我在一个超连接后加个参数如: 
     http://localhost:8080/test/testjstl.jsp?pid=001

   此时在jsp页面中,获取jsp传过来的pid的参数值要使用  ${param.pid}

2. 如果是在java代码中 ,使用了request.setAttribute("attr","attrValue");

    那么在jsp中获取request中的参数值就要使用下面的代码
   ${requestScope.attr} 或者${attr}

3. 在<c:if></c:if test="....">表达式的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>

posted @ 2013-05-14 08:23  wanggd_blog  阅读(52660)  评论(0编辑  收藏  举报