「JSP入門」getContextPath()、getServletPath()、getRequestURI()の使い方
URL
http://127.0.0.1:8080/user/view/demo.jsp
結果
1.request.getContextPath()
/user
2.request.getServletPath()
/view/demo.jsp
3.request.getRequestURI()
/user/view/demo.jsp
4.request.getRequestURL()
http://127.0.0.1:8080/user/view/demo.jsp
5.request.getRealPath()
D:\glassfish-4.1\glassfish4\glassfish\domains\arkgamestudy\eclipseApps\user\