Servlet - URL Mapping

화이티 ·2023년 12월 22일

Servlet

목록 보기
2/3







protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

	System.out.println("ContextPath : Server가 프로젝트를 찾아가는 이름");
	System.out.println(" -> " +request.getContextPath());
	System.out.println("ServletPath : url mapping값");
	System.out.println(" -> " +request.getServletPath());

	System.out.println("URL : 지원의 정확항 위치");
	System.out.println("-> " +request.getRequestURL());
	 System.out.println("URI: 지원의 고유한 식별자");
	System.out.println("-> " +request.getRequestURI());

}
profile
열심히 공부합시다! The best is yet to come! 💜

0개의 댓글