有两种方法:
1、通过对象注入赋值
action类中有属性xxx,以及该属性对应的get和set方法;
在jsp页面中,可以通过<s:property value="xxx">取值
2、通过request session application范围取值
ServletActionContext().getRequest().setAttribute("xxx","value");
然后在jsp页面中通过request.getAttribute("xxx");取值
有两种方法:
1、通过对象注入赋值
action类中有属性xxx,以及该属性对应的get和set方法;
在jsp页面中,可以通过<s:property value="xxx">取值
2、通过request session application范围取值
ServletActionContext().getRequest().setAttribute("xxx","value");
然后在jsp页面中通过request.getAttribute("xxx");取值