zoukankan      html  css  js  c++  java
  • struts 2整合pager-taglib

    来源:http://1179050720-qq-com.iteye.com/blog/1026559
    [size=x-small]struts 2整合pager-taglib,会出现下面的异常
    警告: Error setting expression 'pager.offset' with value '[Ljava.lang.String;@a16605'
    ognl.OgnlException: target is null for setProperty(null, "offset", [Ljava.lang.String;@a16605)
    at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:2239)
    at ognl.ASTProperty.setValueBody(ASTProperty.java:127)
    at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220)
    at ognl.SimpleNode.setValue(SimpleNode.java:301)
    at ognl.ASTChain.setValueBody(ASTChain.java:227)
    at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220)
    at ognl.SimpleNode.setValue(SimpleNode.java:301)
    at ognl.Ognl.setValue(Ognl.java:737)
    以前也遇到这样的问题,不过一直都理它,今天总算把它搞定了,解决方案如下:
    写一个Pager类,里面需要有一个名为offset的成员变量
    public class Pager {
    private long offset;

    public long getOffset() {
    return offset;
    }

    public void setOffset(long offset) {
    this.offset = offset;
    }
    }

    然后在struts 2 的action中写一个名为pager的成员变量,并生成set,get方法,
    就这样,异常就搞定了。
  • 相关阅读:
    T-SQL练习题
    sql server 用脚本管理作业
    sql server维护计划配置
    sql server 里的文件和文件组使用
    mysql 大表优化
    top与with ties用法
    收缩日志文件与数据文件
    监控数据库表的磁盘使用情况
    查看数据字典
    SQL Server中灾难时备份结尾日志(Tail of log)的两种方法
  • 原文地址:https://www.cnblogs.com/IntelligentBrain/p/5111319.html
Copyright © 2011-2022 走看看