Interface HttpServletRequestString getPathInfo() 
          Returns any extra path information associated with the URL the client sent when it made this request.  StringBuffer getRequestURL() 
          Reconstructs the URL the client used to make the request.

解决方案 »

  1.   

    老兄,我肯定试过了呀,getPathInfo肯定返回是null
    extra path information呀!
    其返回值comes after the servlet path but before the query string in the request URL至于getRequestURL(),
    我试过得到的不是http://127.0.0.1:8080/web/test.jsp
    而是http://127.0.0.1:8080/web/Controller呀,因为form中action请求的是Controller的servlet,还是得不到我要的结果!
      

  2.   

    <%= "http://" + request.getServerName() + ":"  + request.getServerPort() + request.getContextPath()%>
      

  3.   

    自己搞定了 55 
    so easy,头文件 hoho~~