我们可以采用<c:choose>来代替<c:if>
具体结构:
<c:choose>
<c:when test=""> 如果
</c:when>
<c:otherwise> 否则
</c:otherwise>
</c:choose> 代码示例: <c:choose> <c:when test="${sessionScope.USERTYPE == 'inner'}"> <c:set value="${context_root}/igmgr/MEB004.dow" var="action" scope="page"/> </c:when> <c:when test="${sessionScope.USERTYPE == 'merc'}"> <c:set value="${context_root}/igmgr/MEB021.dow" var="action" scope="page"/> </c:when> <c:otherwise> <c:set value="${context_root}/igmgr/MEB020.dow" var="action" scope="page"/> 范例说明:当condition1为true时,会显示“condition1为true”;当condition1为false且condition2为true时,会显示“condition2为true”,如果两者都为false,则会显示“condition1和condition2都为false”。 注意:假若condition1和condition2两者都为true时,此时只会显示"condition1为true",这是因为在同一个<c:choose>下,当有好几个<c:when>都符合条件时,只能有一个<c:when>成立。
</c:otherwise> </c:choose>

最新文章

  1. yum源配置与使用
  2. js中的forEach
  3. C#异常类相关总结
  4. Hbase原理、基本概念、基本架构
  5. Ajax编程中,经常要能动态的改变界面元素的样式
  6. Residual Networks &lt;2015 ICCV, ImageNet 图像分类Top1&gt;
  7. nyoj---t448(寻找最大数)
  8. 转: Android开发中的MVP架构详解(附加链接比较不错)
  9. [CC150] Get all permutations of a string
  10. centos安装svn
  11. python绝技 — 嗅探FTP登录口令
  12. ProjectManager Beta 2 项目管理器发布
  13. ssm开发使用redis作为缓存,使用步骤
  14. .Net Core下 Redis的String Hash List Set和Sorted Set的例子
  15. There are multiple modules with names that only differ in casing. 黄色warning
  16. TopCoder SRM502 Div1 1000 动态规划
  17. getOutputStream与getWriter方法
  18. [uwsgi: command not found]
  19. Python 初识网络
  20. 【struts2】action中使用通配符

热门文章

  1. python学习之路(17)
  2. RedisTemplate集合使用说明-opsForList(二)
  3. iOS检测QQ是否安装
  4. C++入门经典-例5.10-指针作为返回值
  5. LeetCode 12. 整数转罗马数字(Integer to Roman)
  6. 百度echars 插件 横坐标信息倾斜显示
  7. weblogic报:java.lang.LinkageError: loader constraint violation in interface itable initialization
  8. Application 使用分析
  9. Go语言程序结构
  10. Selenium 2自动化测试实战8(控制浏览器)