struts2 ValueStack的set方法与setValue方法的区别
来源:互联网 发布:今日财经数据 编辑:程序博客网 时间:2024/06/05 17:54
错将set 方法 用成 setValue方法
Struts Problem Report
Struts has detected an unhandled exception:
Messages:
- No object in the CompoundRoot has a publicly accessible property named 'pageBean' (no setter could be found).
- Error setting expression 'pageBean' with value 'cn.itcast.shop.util.PageBean@bac4698'
- ActionContext.getContext().getValueStack().setValue("myname22", "ttt");
- ActionContext.getContext().getValueStack().set("myname22", "ttt");
- String myname2=(String)ServletActionContext.getContext().getValueStack().findValue("myname22");
- package example;
- import org.apache.struts2.ServletActionContext;
- import com.opensymphony.xwork2.ActionContext;
- import com.opensymphony.xwork2.ActionSupport;
- public class GetValueAction extends ActionSupport {
- private static final long serialVersionUID = 4865100826143278474L;
- private String myname=null;
- // private String myname22;
- @Override
- public String execute() throws Exception {
- ActionContext.getContext().getValueStack().set("myname22", "ttt");
- String myname2=(String)ServletActionContext.getContext().getValueStack().findValue("myname22");
- // System.out.println("myname2: "+this.myname);
- return super.execute();
- }
- public String getMyname() {
- return myname;
- }
- public void setMyname(String myname) {
- this.myname = myname;
- }
- // public String getMyname22() {
- // return myname22;
- // }
- //
- // public void setMyname22(String myname22) {
- // System.out.println("abc:"+myname22);
- // this.myname22 = myname22;
- // }
- // public String getMyname22() {
- // return myname22;
- // }
- }
0 0
- struts2 ValueStack的set方法与setValue方法的区别
- ValueStack的set和setvalue方法
- struts2中的ActionContext 与 valueStack的区别
- setvalue与setObject的区别
- struts2的ognl与valuestack
- _winreg中SetValueEx和SetValue两个方法的区别
- 字典方法setValue:ForKey setObject:ForKey的区别
- KVC setvalue:forkey与setvalue:forkeypath的区别
- set与get方法的区别
- ValueStack 与StackContext 的区别
- struts2 OGNL ValueStack概念理解 # % $ 的区别
- struts2 OGNL ValueStack概念理解 # % $ 的区别
- struts2 OGNL ValueStack概念理解 # % $ 的区别
- Struts2 ValueStack和StackContext的区别
- setValue:forKey:与setObject:forKey:的区别
- Struts Ongl valueStack与ActionContent.ValueStack的区别
- struts2的get,set方法的作用。
- java 学习之List 的 add 与set方法区别
- 代码规范
- 我的c学习:循环嵌套
- MiniUI快速入门教程(五)主框架布局
- Linux操作系统实用技巧精彩汇集
- [乐意黎转载]前端涉及的知识体系
- struts2 ValueStack的set方法与setValue方法的区别
- Android 异步查询框架AsyncQueryHandler的使用
- PHP设计模式之——策略模式
- mysql存储过程和游标遍历
- 免安装Oracle客户端使用PLSQL Developer连接Oracle
- 24.Which two statements correctly describe the relation between a data file and the logical database
- 【腾讯Bugly干货分享】深入理解 ButterKnife,让你的程序学会写代码
- MySQL的几个概念:主键,外键,索引,唯一索引
- 前端基础 及遇到的问题