摘要:
Struts2的Action并未直接与任何Servlet API耦合,要想访问Servlet API,可以通过ActionContext这个类来实现:在action中定义如下方法:Java代码 public String actionContext() { ActionContext ctx = ActionContext.getContext(); ctx.getApplication().put("application", "application范围"); ctx.getSession().put("session", &qu 阅读全文