例如 我点击一个链接 先要走拦截器程序,在拦截器中如何获取这个url
ActionContext actionContext = invocation.getInvocationContext(); HttpServletRequest request= (HttpServletRequest) actionContext.get(StrutsStatics.HTTP_REQUEST); request.getRequestURI()
ActionContext actionContext = invocation.getInvocationContext();HttpServletRequest request= (HttpServletRequest) actionContext.get(StrutsStatics.HTTP_REQUEST);
request.getRequestURI()
HttpServletRequest request = ServletActionContext.getRequest(); ActionContext context = invocation.getInvocationContext(); String path = request.getRequestURI();//url String reqPamrs = request.getQueryString();//?后面的参数
你自己看一下那个对象不就好了
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(4)
ActionContext actionContext = invocation.getInvocationContext();
HttpServletRequest request= (HttpServletRequest) actionContext.get(StrutsStatics.HTTP_REQUEST);
request.getRequestURI()
你自己看一下那个对象不就好了