'javax.servlet.http.HttpServletRequest'에 해당되는 글 1

  1. 2011.07.27 HttpServletRequest 클래스의 메서드

HttpServletRequest 클래스의 메서드

참고, http://www.devkuma.com/books/pages/1190
spec을 잘 봐라  https://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest.html

Tomcat 6.0(?) 에서 테스트
Context 는 test
http://localhost:8080/test/t.jsp?qqq

 getRequestURL()  http://localhost:8080/test/t.jsp
 getRequestURI()  /test/t.jsp
 getServletPath()  /t.jsp
 getPathInfo()  null
 getQueryString()  qqq
 getProtocol()  HTTP/1.1
 getScheme()  http


-
http://localhost:8080/test1/epr/vendor/index.html?qqq

getContextPath:/test1
getServletPath:/epr/vendor/index.html
getMethod:GET

getPathInfo:null
getAuthType:null
getContentType:null
getLocalName:0:0:0:0:0:0:0:1

getPathTranslated:null
getRealPath:C:\eGovFrame-3.6\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\test1\
getCharacterEncoding:null
getServerPort:8080