在xwork2.05之前使用这段代码是没有错误的:
ActionContext ctx = ActionContext.getContext();
Map session = ctx.getSession();
session.put(String, Object);
但在xwork2.1.2之后中就会出现null错误
解决的方法:
Map session = new HashMap();
ActionContext.getContext().setSession(session);
session.put(String, Object);
转载于:https://my.oschina.net/haopeng/blog/95431