关于HttpServletRequest.getContextPath()取得的路径
来源:互联网 发布:yy语音淘宝刷单平台 编辑:程序博客网 时间:2024/05/17 04:24
假定你的web application 名称为news,你在浏览器中输入请求路径:
http://localhost:8080/news/main/list.jsp
则执行下面向行代码后打印出如下结果:
1、 System.out.println(request.getContextPath());
打印结果:/news
2、System.out.println(request.getServletPath());
打印结果:/main/list.jsp
3、 System.out.println(request.getRequestURI());
打印结果:/news/main/list.jsp
4、 System.out.println(request.getRealPath("/"));
打印结果:F:\Tomcat 6.0\webapps\news\test
- 关于HttpServletRequest.getContextPath()取得的路径
- 关于路径:request.getContextPath()
- HttpServletRequest getServletPath() getContextPath() getRequestURI()
- 关于路径<%=request.getContextPath()%>和${pageContext.request.contextPath}的问题
- request.getContextPath()获取的是什么路径?
- request.getContextPath()获取的是什么路径?
- 关于ark取得进程的镜像文件路径
- 关于request.getContextPath()的小发现
- HttpServletRequest 关于 URL 的函数
- 来访者的IP地址的取得:HttpServletRequest#getRemoteAddr()
- struts2的Action中取得HttpServletRequest的方法
- request.getContextPath()路径问题
- HttpServletRequest获取各种路径的总结
- [NET]关于在ASP.NET中物理路径和虚拟路径的取得
- 关于在ASP.NET中物理路径和虚拟路径的取得
- 关于在ASP.NET中物理路径和虚拟路径的取得
- 关于在ASP.NET中物理路径和虚拟路径的取得
- javaWeb中getContextPath()等方法获取路径的区别
- __cdecl __fastcall与 __stdcall区别
- Linux内核发送构造数据包的方式
- mysql的client_flags
- 小议UNSOL_RESPONSE_CALL_STATE_CHANGED与GET_CURRENT_CALLS
- 主动FTP vs. 被动FTP 权威解释
- 关于HttpServletRequest.getContextPath()取得的路径
- 用户权限管理
- 关于SIGPIPE信号
- oracle锁整理
- svn 更新 合并 提交的区别
- mysql调优及点滴记录
- 理解BinFS, Multi-XIP, Multi-bin
- input subsystem 笔记2
- Scope for Android: 社交网络聚合应用 支持国外主流社交媒体