1新建web工程,导入Struts2支持 2使用ActionContext访问Servlet API 3使用IOC的方式访问Servlet ApI 4耦合方式(ServletActionContext)访问Servlet API(该方法不推荐使用)