request获取地址url中各个部分的方法
2014-02-24 23:13
309 查看
http://localhost:8080/coreSvn/bosn/admin/NewsInfo!add.action
***************************************
ActionContext ac = ActionContext.getContext();
ServletContext sc = (ServletContext)ac.get(ServletActionContext.SERVLET_CONTEXT);
String ctxDir = sc.getRealPath(File.separator);
logger.info("ctxDir:"+ctxDir);
sc.getRealPath:E:\xx\workspace\coreSvn\WebContent\
sc.getContextPath:/coreSvn
csc.getMajorVersion:2
sc.getMinorVersion:5
sc.getServerInfo:Apache Tomcat/6.0.37
[b]**************************************
[/b]
request.getIntHeader-1
request.getLocalAddr
0.0.0.0
request.getLocalName
0.0.0.0
request.getLocalPort
8080
request.getMethod
GET
request.getPathInfo
null
request.getPathTranslatednull
request.getProtocol
HTTP/1.1
request.getRemoteAddr
0:0:0:0:0:0:0:1
request.getRemoteHost
0:0:0:0:0:0:0:1
request.getRemotePort
52686
request.getRemoteUser
null
request.getRequestURI
/coreSvn/bosn/admin/NewsInfo!add.action
request.getRequestURL http://localhost:8080/coreSvn/bosn/admin/NewsInfo!add.action
request.getScheme
http
request.getServerName
localhost
request.getServerPort
8080
request.getServletPath/bosn/admin/NewsInfo!add.action
***************************************
ActionContext ac = ActionContext.getContext();
ServletContext sc = (ServletContext)ac.get(ServletActionContext.SERVLET_CONTEXT);
String ctxDir = sc.getRealPath(File.separator);
logger.info("ctxDir:"+ctxDir);
sc.getRealPath:E:\xx\workspace\coreSvn\WebContent\
sc.getContextPath:/coreSvn
csc.getMajorVersion:2
sc.getMinorVersion:5
sc.getServerInfo:Apache Tomcat/6.0.37
[b]**************************************
[/b]
request.getIntHeader-1
request.getLocalAddr
0.0.0.0
request.getLocalName
0.0.0.0
request.getLocalPort
8080
request.getMethod
GET
request.getPathInfo
null
request.getPathTranslatednull
request.getProtocol
HTTP/1.1
request.getRemoteAddr
0:0:0:0:0:0:0:1
request.getRemoteHost
0:0:0:0:0:0:0:1
request.getRemotePort
52686
request.getRemoteUser
null
request.getRequestURI
/coreSvn/bosn/admin/NewsInfo!add.action
request.getRequestURL http://localhost:8080/coreSvn/bosn/admin/NewsInfo!add.action
request.getScheme
http
request.getServerName
localhost
request.getServerPort
8080
request.getServletPath/bosn/admin/NewsInfo!add.action
相关文章推荐
- ASP.NET 取得 Request URL 的各个部分和通过ASP.NET获取URL地址的方法
- ASP.NET 取得 Request URL 的各个部分和通过ASP.NET获取URL地址的方法
- ASP.NET 取得 Request URL 的各个部分和通过ASP.NET获取URL地址的方法
- ASP.NET 取得 Request URL 的各个部分和通过ASP.NET获取URL地址的方法
- ASP.NET 取得 Request URL 的各个部分和通过ASP.NET获取URL地址的方法
- ASP.NET 取得 Request URL 的各个部分和通过ASP.NET获取URL地址的方法
- jQuery mobile转换url地址及获取url中目录部分的方法
- URL 的各个部分和通过ASP.NET获取URL地址的方法
- Request获取URL地址相应方法
- jQuery mobile转换url地址及获取url中目录部分的方法
- 通过request获取ID地址的方法
- DedeCms获取当前页面URL地址的实现方法
- Request获取URL各种信息的方法及Request.UrlReferrer的使用
- Request获取url信息的各种方法比较 及 Request.UrlReferrer详解
- javascript 获取url中各个部分的功能方法
- JS获取几种URL地址的方法
- php获取当前url地址的方法小结
- Request获取url信息的各种方法比较
- [ASP.NET]从Request.Url获取根网址的最简单方法
- Request获取url各种信息的方法