struts1和struts2 的区别探究

Struts框架值存储区别
本文探讨了Struts1与Struts2框架中值的存储方式的区别,并通过具体示例展示了请求属性的处理过程,包括如何获取和打印请求中的属性。
Enumeration e=request.getAttributeNames();
	while(e.hasMoreElements())
	{
	    String s=e.nextElement().toString();
                       out.println(s);
	       out.println(request.getAttribute(s));
	}
com.opensymphony.xwork2.ognl.OgnlValueStack o=(com.opensymphony.xwork2.ognl.OgnlValueStack)request.getAttribute("struts.valueStack");
out.println(o.findValue("page"));

 struts1 和struts2存储值的区别。

javax.servlet.forward.request_uri /zogo/control/center/admin/mgrCarType.action
javax.servlet.forward.context_path /zogo
javax.servlet.forward.servlet_path /control/center/admin/mgrCarType.action
struts.request_uri /zogo/control/center/admin/mgrCarType.action
struts.view_uri /WEB-INF/jsp/sysback/car/car_type.jsp
__cleanup_recursion_counter 1 spring2encoding.FILTERED true
struts.valueStack com.opensymphony.xwork2.ognl.OgnlValueStack@370f7b org.zhonggu.dao.utils.Page@d968dd 

  

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值