반응형
javax.servlet.http.HttpServletRequest 오브젝트가 제공하는 정보를 활용해서 정보를 얻을 수 있다.
접속 주소가 아래와 같다고 한다면
http://localhost:8080/test
각각의 객체로 주소 정보를 활용할 수 있다.
| ${pageContext.request.scheme} | http |
| ${pageContext.request.serverName} | localhost |
| ${pageContext.request.serverPort} | 8080 |
| ${pageContext.request.contextPath} | /test |
반응형