读struts2源码org.apache.struts2.components.ServletUrlRenderer得到当前访问路径的namespace及action。
ActionInvocation ai = (ActionInvocation) ActionContext.getContext().get(ActionContext.ACTION_INVOCATION);
final String action = ai.getProxy().getActionName();
final String namespace = ai.getProxy().getNamespace();
System.out.println(action+"--------"+namespace);