当前位置: 代码迷 >> JavaScript >> 取JSP,Action中全途径的方法
  详细解决方案

取JSP,Action中全途径的方法

热度:120   发布时间:2012-11-08 08:48:11.0
取JSP,Action中全路径的方法
取JSP,Action中全路径的方法JSP中:${pageContext.request.contextPath} 
      
利用EL表达式,相当于http://localhost:8080/应用名称Jave类中:
String path = request.getScheme()+"://" + request.getServerName()+ ":"+ request.getServerPort()+ request.getContextPath();
  相关解决方案