HttpServletRequest 的常用属性说明
HttpServletRequest 的常用属性总是被窝遗忘,人老了记性就不好。所以做个笔记,方便以后查看。
测试地址:http://127.0.0.1:8080/Test/test
- getContentType:null
- getContextPath:/Test
- getLocalAddr:127.0.0.1
- getLocalName:luych
- getLocalPort:8080
- getRemoteAddr:127.0.0.1
- getRemoteHost:127.0.0.1
- getRemotePort:61942
- getRemoteUser:null
- getScheme:http
- getServerName:127.0.0.1
- getServerPort:8080
- getServletPath:/test
- getRequestURI:/Test/test
- getRequestURL:http://127.0.0.1:8080/Test/test