예를 들어 아래와 같은 URL일 경우
http://127.0.0.1:8080/contextpath/servlcetpath/index.jsp?seq=1&name=test
httpServletRequest.getRequestURL()
http://127.0.0.1:8080/contextpath/servlcetpath/index.jsp
httpServletRequest.getRequestURI()
/contextpath/servlcetpath/index.jsp?
httpServletRequest.getContextPath()
/contextpath
httpServletRequest.getServletPath()
/servlcetpath/index.jsp
httpServletRequest.getQueryString()
seq=1&name=test
httpServletRequest.getServerName()
127.0.0.1
httpServletRequest.getServerPort()
8080
'Web Programming > JAVA' 카테고리의 다른 글
val var (0) | 2023.09.01 |
---|---|
ArrayList 마지막에 add한 객체가 그동안의 객체를 덮어쓰기 하는 문제 (feat. static) (0) | 2023.01.27 |
Calendar week of year 53주 대신 1주 뜨는 현상 해결 (0) | 2021.01.11 |
[JAVA] JAVA 언어의 이해 (0) | 2020.01.21 |