url 주소 가져오는 함수_jsp
2022. 2. 5. 17:09ㆍksmart_jsp/06_jsp_java_mysql_model01
728x90
request.getContextPath() 함수
예) http://localhost:8080/project/list.jsp
request.getRequestURI() 함수
예) http://localhost:8080/project/list.jsp
request.getRequestURL() 함수
예) http://localhost:8080/project/list.jsp
request.ServletPath() 함수
예) http://localhost:8080/project/list.jsp
request.getRealPath("") 함수
예) http://localhost:8080/projectname/list.jsp
->절대경로로 가져옴
[return] c:\project\webapps\projectname\
728x90
'ksmart_jsp > 06_jsp_java_mysql_model01' 카테고리의 다른 글
31_jsp_java_DTO(bean)_DAO_insert처리_jsp (0) | 2022.02.05 |
---|---|
30_jsp_java_DTO(bean)_update처리_jsp (0) | 2022.02.05 |
29_jsp_java_DTO(bean)_insert처리_jsp (0) | 2022.02.05 |
28참조 (0) | 2022.02.05 |
28_jsp_java_driver로딩_db연결분리_처리_jsp (0) | 2022.02.05 |