getRequestURI1 URL/URI ex) localhost/page/list.do?type=aa URL: localhost/page/list.do?type=aaURI: /page/list.docontextPath: /page 서블릿에서의 핵심 코드 12345String command = request.getRequestURI(); if(command.indexOf(request.getContextPath()) == 0) { command = command.substring(request.getContextPath().length());}Colored by Color Scriptercs 경로 구하기 1. getRequestURI() 메서드를 이용하여 URI를 구한다.2. 구한 URI에서 getContextPath() 메서드로 설정 경로의 .. 2018. 7. 19. 이전 1 다음