在Jsp中使用<s:if test="">,条件的值是action中设置的session的值
2017-05-28 23:15
543 查看
可以直接
<s:if test="#session.要使用的对象名. 属性名">
<s:if test="#session.要使用的属性名">
struts2使用的是OGNL表达式,JSP使用的是EL表达式
在该标签中不能使用EL表达式:${sessionScope.属性名}
<s:if test="#session.要使用的对象名. 属性名">
<s:if test="#session.要使用的属性名">
struts2使用的是OGNL表达式,JSP使用的是EL表达式
在该标签中不能使用EL表达式:${sessionScope.属性名}
相关文章推荐
- JSP自定义标签中不能使用<%=request.getSession.getAttribute("attributeName")%>
- MyBatis 判断条件为等于的问题(<if test="type == '1'.toString()"> xxx </if>
- 如何在JSP页面中使用JSTL标签实现if和if-else判断,判断条件使用<%=value%>
- <c:if test=""></c:if>如何判断空(使用例子)
- <s:if test="">的使用问题
- <c:if test="">多条件判断
- web前端 c标签的使用之<c:forEach>和<c:if test="">
- <s:if test="">标签以动态数据为判断条件
- struts2 国际化 <s:if test="%{#session.WW_TRANS_I18N_LOCALE.toString()=='zh_CN'}">
- spring3 jsp页面使用<form:form modelAttribute="xxxx" action="xxxx">报错,附连接数据库的spring MVC annotation 案例
- mybatis 里面使用<if test=""> 判断,当后台传的值是数字字符串时,怎么处理
- spring3 jsp页面使用<form:form modelAttribute="xxxx" action="xxxx">报错,附连接数据库的spring MVC annotation 案例
- jsp页面中的<c:if test="">中的<%= %>判断是否相等
- <c:if test=" ${cppc.hpid==hpcc.id}">条件判断
- <c:if test=""></c:if>如何判断空(使用例子)
- 只显示 前100个字 java 实现截取字符串!使用! <c:if test="${fn:length(onebeans.info)>100 }">${ fn:substri
- struts2中JSP无法用<jsp:forward page="test.action"> 跳转到对应的 action中解决方法
- JSP中 <c:if test="${key1!=null}">是什么意思
- 使用mybatis遇到的关于条件查询">"以及if test传参的使用问题
- <c:if test="${fn:contains(name, searchString)}">