request中getContextPath、getServletPath的区别
2016-10-19 11:51
405 查看
访问:http://localhost:8080/app/testJsp.jsp
<%=request.getContextPath()%> ·<!-- 返回站点的根路径。 --> /app
<%=request.getServletPath()%> /testJsp.jsp
<%=request.getRequestURI()%> /app/testJsp.jsp
<%=request.getRealPath("/")%> <!-- 工程文件的实际物理路径 --> E:\计算机视频\验证码\app\WebRoot\
<%=request.getScheme() %>
<!-- 返回当前页面使用的协议,http 或是 https-->
<%=request.getServerName()%> <!-- 返回当前页面所在的服务器主机的名字; -->
<%=request.getServerPort()%> <!-- 返回服务器接受此请求所用的端口号 -->
相关文章推荐
- Request中getContextPath、getServletPath、getRequestURI、request.getRealPath的区别
- request中的getContextPath()和getServletPath()和getRequestURI()和getRealPath()的区别~~
- getContextPath、getServletPath、getRequestURI的区别
- Request中getContextPath、getServletPath、getRequestURI、request.getRealPath的区别
- Request中getContextPath、getServletPath、getRequestURI、request.getRealPath的区别
- getContextPath、getServletPath、getRequestURI的区别
- getContextPath、getServletPath、getRequestURI的区别
- getContextPath、getServletPath、getRequestURI的区别
- Request中getContextPath、getServletPath、getRequestURI、request.getRealPath的区别
- getContextPath、getServletPath、getRequestURI的区别
- getContextPath、getServletPath、getRequestURI的区别
- request.getRequestURI() 、request.getRequestURL() 、request.getContextPath()、request.getServletPath()区别
- getContextPath、getServletPath、getRequestURI的区别
- Request中getContextPath、getServletPath、getRequestURI、getRequestURL、getRealPath的区别
- Request中getContextPath、getServletPath、getRequestURI、getRequestURL、getRealPath的区别
- 【转】getContextPath、getServletPath、getRequestURI的区别
- Request中getContextPath、getServletPath、getRequestURI、getRequestURL、getRealPath的区别
- Request中getContextPath、getServletPath、getRequestURI、request.getRealPath的区别
- getContextPath、getServletPath、getRequestURI的区别
- Request中getContextPath、getServletPath、getRequestURI、request.getRealPath的区别