위로 아래

getRequestURL()

request.getRequestURL()

전체 주소 가져오기
주어진 값 : http://localhost:8080/Board/BoardList.jsp
반환 값 : http://localhost:8080/Board/BoardList.jsp

 

 

 


getContextPath()

request.getContextPath()

Path 가져오기 

주어진 값 : http://localhost:8080/Board/BoardList.jsp

반환 값 : /Board

 

 

 


getRequestURI() 

request.getRequestURI()

프로젝트와 프로젝트 주소 가져오기

주어진 값 : http://localhost:8080/Board/BoardList.jsp

반환 값 : /Board/BoardList.jsp

 

 

 


ServletPath() 

request.ServletPath()

파일명 가져오기

주어진 값 : http://localhost:8080/Board/BoardList.jsp

반환 값 : /list.jsp

 

 

 


getRealPath() 

request.getRealPath()

절대결로 가져오기

주어진 값 : http://localhost:8080/Board/BoardList.jsp

반환 값 : c:\project\webapps\Board\