scope=객체의 유지할 범위를 설정
pageContext(자신페이지)
request(페이지간 이동)
session(브라우저)
application(톰켓)
<jsp:useBean id="obj" class="MyClasses.MyClass" scope="session">
<jsp:setProperty name="obj" property="i" value="11"/>
</jsp:useBean>
<jsp:setProperty name="obj" property="*" />
<jsp:getProperty name="obj" property="i" />
<%=obj.getTel() %>
http://codeworld.tistory.com/entry/UseBean-%EC%82%AC%EC%9A%A9-%EB%B0%A9%EB%B2%95
http://okjsp.pe.kr/lecture/lec04/bean01.htm
http://blog.daum.net/oraclejava/15867606
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Insert title here</title>
</head>
<body>
<jsp:useBean id="obj" class="test.Point">
<jsp:setProperty name="obj" property="*" />
</jsp:useBean>
<br/>
x:<jsp:getProperty name='obj' property="x" /><br/>
y:<%= obj.getY() %><br/>
distance:<jsp:getProperty name='obj' property="distance"/>
</body>
</html>
'JavaWeb' 카테고리의 다른 글
[JSP] web.xml 구성 (0) | 2015.09.07 |
---|---|
[JSP] 서블릿 클래스의 init, destory 메서드 (0) | 2015.09.07 |
[JSP] include (0) | 2015.09.07 |
[빌드오류] Access restriction: The type QName is not accessible due to restriction on required library (0) | 2015.09.07 |
문자열 포맷 (0) | 2015.09.07 |
댓글