application 내장 객체
- ServletContext application
- 사용자 모두가 공유하는 전역적 의미의 객체
- 서버에 대한 정보를 관리하는 객체
// /bbs폴더의 실제 물리적인 경로
out.print(application.getRealPath("/bbs"));
실제 서버에서 돌렸을 때는 파란색 박스의 경로는 나오지 않는다.
//application 내부 변수
application.setAttribute("uid", "ITWILL");
out.print(application.getAttribute("uid"));
out.print("<hr>");
response 내장객체
요청한 사용자에게 응답할 때
response.sendRedirect("") 페이지 이동
//요청한 사용자에게 응답 메시지 전송 (AJAX에서 많이 사용)
PrintWriter print = response.getWriter();
'웹개발 교육 > jsp' 카테고리의 다른 글
[57일] jsp (28) - myweb 프로젝트(회원 등급 별 권한 부여) (0) | 2022.10.18 |
---|---|
[55~56일] jsp (27) - myweb 프로젝트(로그인, 로그아웃) (0) | 2022.10.17 |
[55일] jsp (25) - web.xml (0) | 2022.10.17 |
[55일] jsp (24) - session 내장 객체 (0) | 2022.10.17 |
[55일] jsp (23) - SCOPE (0) | 2022.10.17 |