본문 바로가기
Programming/Struts

Struts taglib

by 막이 2012. 9. 12.

Struts logic 커스텀 태그

정의 - 빈과 JSP의 Logic 처리 담당하는 커스텀 태그

종류

logic 커스텀 태그

설명

logic:present

해당 자원의 존재 유무를 체크

logic:equal

빈의 property 값을 비교

logic:iterate

빈의 속성 및 바인딩 객체를 반복

logic:forward

Forward 처리

logic:redirect

Redirect 처리

<html:errors/>
: 에러가 발생했을때 처리 할 수 있도록 처리하는 Tag
<html:form action="/search">
: form데이터가 있을때 처리할 Action객체와 연결.
<html:text property="name">
: <input type="text" name="text">와 같은 형식.* property = name 기억!
<html:submit value="register">
: <input type="submit" value="register">와 같은 형식
.... 더있다, 알아보자!

<bean:message key="저장된key">
: messege-resource-propety에 저장된 값을 불러낼때 쓰는,
<bean:write name="" property="">
: 참조하는 값의 객체의 이름이 name인 것의 property를 출력
주의) BeanClass에는 반드시 getter()와 setter()가 존재해야한다!
<bean:size id="ref이름" name="참조하는객체이름" property="property 이름">
: property의 개수를 센다
...이거도 더있다.

<logic:present name="searchForm" property="results">
: searchForm에 results가 있으면 수행
<logic:iterate id="" name="" property="">
: name 객체의 property를 id에 담아서 반복 수행
<logic:equeal/greaterThan>
: 크기 비교.

'Programming > Struts' 카테고리의 다른 글

struts web.xml 설정 태그  (0) 2012.09.12
struts-config.xml 파일 정보  (0) 2012.09.12
global-forwards  (0) 2012.09.12