티스토리 뷰

정리하기/서버

자바빈

내가송 2018. 8. 4. 20:22
반응형

자바빈

JSP에서 사용되는 데이터 저장소 

그냥 java로 이루어진 데이터 object라고 보면 될 듯 하다 


특징으로는 

- private 타입으로 된 프로퍼티(멤버 변수)를 갖고 있다. 

- setter / getter 존재

- 인자 없는 생성자는 반드시 존재

- serialize 되어야한다.  (직렬화 객체)


ex.


public StudentBean implements Serializable {

private String name;

private Integer age;



public StudentBean() {}


public String getName() { return this.name; }

public Integer getAge() { return this.age; }

public void setName(String name1) { this.name = name1; }

public void setAge(Integer age1) { this.age = age1; } 

}


반응형

'정리하기 > 서버' 카테고리의 다른 글

가상 호스트  (0) 2018.08.26
tomcat conf 디렉토리 살펴보기  (0) 2018.08.26
Servlet  (0) 2018.08.04
웹 애플케이션 개요  (0) 2018.08.04
tomcat 디렉토리 살펴보기  (0) 2018.07.24
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함