Obtain the request, session, and application information in the background, and add information to it before reading the page. The implementation methods include: 1. Declare various types in action, this method is obtained using actionContext, and the values obtained in actionContext are of the Map type. [Java] package com. thridProject. action; import java. util. map; import com. opensymphony. xwork2.ActionContext; import com. opensymphony. xwork2.ActionSupport; public class WebProperty extends ActionSupport {private Map request; private Map session; private Map application; public WebProperty () {request = (Map) ActionContext. getContext (). get ("request"); session = (Map) ActionContext. getContext (). getSessio N (); application = (Map) ActionContext. getContext (). getApplication ();} public String execute () {request. put ("a", 1); session. put ("B", 2); application. put ("c", 4); return SUCCESS;} 2. The second method is to implement the interface provided by struts, for example, code: [java] package com. thridProject. action; import java. util. map; import org. apache. struts2.interceptor. applicationAware; import org. apache. struts2.interceptor. requestAware; import org. apache. Struts2.interceptor. sessionAware; import com. opensymphony. xwork2.ActionSupport; public class WebProperty extends ActionSupport implements RequestAware, SessionAware, ApplicationAware {/*** author Zhang chunlei */private static final long serialVersionUID =-callback; private Map <String, object> request; private Map <String, Object> session; private Map <String, Object> application; public void setRe Quest (Map <String, Object> request) {this. request = request;} public void setSession (Map <String, Object> session) {this. session = session;} public void setApplication (Map <String, Object> application) {this. application = application;} public String execute () {request. put ("a", 1); session. put ("B", 2); application. put ("c", 4); return SUCCESS ;}second is the most common method. 3. The third method is to use import org. apache. struts2.ServletActionContext to get the request. You can view [java] request = ServletActionContext. getRequest (); 4. Implement the ServletRequestAware interface and use dependency injection. The values of the first two types are Map values, and the actual values of the last two types are obtained.