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
Struts框架值存储区别
本文探讨了Struts1与Struts2框架中值的存储方式的区别,并通过具体示例展示了请求属性的处理过程,包括如何获取和打印请求中的属性。

1084

被折叠的 条评论
为什么被折叠?



