zoukankan      html  css  js  c++  java
  • 注意在<s:if test="#session.user.power==0">中不能用 <s:if test=$sessionScope.user.power==0">

    获取封装在session的对象

    用#session.对象名,可以获取对象

    用#session.对象名.属性,可以获取属性。

    注意在<s:iftest="#session.user.power==0">中不能用

    <s:if test=$sessionScope.user.power==0">

    具体解释:

    错误提示如下:
    2008-3-12 10:53:13 org.apache.catalina.core.StandardWrapperValve invoke
    严重: Servlet.service() forservlet jsp threw exception
    org.apache.jasper.JasperException: /taglib/ifelse.jsp(17,2)According to TLD orattribute directive in tag file, attribute test does not accept any expressions

     

    经查找发现解决办法如下

    错误提示是,该标签不能接受el表达式
    struts2.0标签主要支持的是ognl表达式
    所以把<s:elseiftest="${age > 35}">
    改为<s:elseiftest="#age>35">
    就ok了

  • 相关阅读:
    DBG
    gdb Debugging Full Example
    Java Warmup
    Dtrace for Linux 2016
    分布式系统理论进阶
    Java theory and practice
    Dealing with InterruptedException
    JVM 虚拟化
    Intro to Filtering with Network Monitor 3.0
    spring 官方文档
  • 原文地址:https://www.cnblogs.com/w1217/p/5491197.html
Copyright © 2011-2022 走看看