struct2 拿到url的方法

在Action中:
HttpServletRequest request = ServletActionContext.getRequest();
String url =request.getRequestURL();
在拦截器中:
public String intercept(ActionInvocation ai) throws Exception {
  String url = ai.getProxy().getActionName()+"!"+ai.getProxy().getMethod();
  .......
}

posted @ 2017-07-08 21:52  lgp20151222  阅读(190)  评论(0编辑  收藏  举报