자바 현재 주소 가져오기

    JAVA/JAVA 정리

    [JAVA] 현재 주소/현재 실행 파일 경로 가져오기

    http://localhost:8080/jspWebApp/request.jsp?name=julla 접속시 - 설명 코드 출력값 컨텍스트 경로 현재 파일을 제외한 경로 request.getContextPath() /jspWebApp 요청 URL 파라미터를 제외한 주소 전체 request.getRequestURL().toString() http://localhost:8080/jspWebApp/request.jsp 요청 URI 현재 파일을 포함한 파일 경로 request.getRequestURI() /jspWebApp/request.jsp 질의 문자열 파라미터만 가져옴 request.getQueryString() name=julla 서블릿 경로 현재 파일만 가져옴 request.getServletPath() ..