摘要: 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 阅读全文
posted @ 2012-02-19 19:16 rason2008 阅读(272) 评论(0) 推荐(0) 编辑