StudyJSP - jsp6_application - attributeScopeTest2.jsp

모쿠모쿠·2022년 6월 20일

JSP

목록 보기
63/151
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<h1>attributeScopeTest2.jsp</h1>
	
	<!-- 각 영역 객체에 저장된 값 가져오기 => getAttribute(String key) 메서드 사용 -->
	<h3>pageContext 객체 값 : <%=pageContext.getAttribute("pageValue") %></h3>
	<h3>request 객체 값 : <%=request.getAttribute("requestValue") %></h3>
	<h3>session 객체 값 : <%=session.getAttribute("sessionValue") %></h3>
	<h3>application 객체 값 : <%=application.getAttribute("applicationValue") %></h3>
	
	
	
	
</body>
</html>

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>

Insert title here

attributeScopeTest2.jsp

pageContext 객체 값 : <%=pageContext.getAttribute("pageValue") %>

request 객체 값 : <%=request.getAttribute("requestValue") %>

session 객체 값 : <%=session.getAttribute("sessionValue") %>

application 객체 값 : <%=application.getAttribute("applicationValue") %>

profile
Hello, Velog!

0개의 댓글