newLine.tag 파일 생성
<%@tag pageEncoding="utf-8" %>
<%@tag body-content="empty"%>
<%@attribute name="color" %>
<%@attribute name="size" type="java.lang.Integer" %>
<font color="${color}">
<%
for(int cnt=0 ; cnt<size; cnt++){
out.print("-");
}
%>
</font>
<br />
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@taglib prefix="util" tagdir="/WEB-INF/tags" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<util:newLine color="blue" size="25"/>
저녁메뉴<br />
<util:newLine color="red" size="20"/>
불고기 덮밥<br />
카레라이스<br />
쫄면<br />
<util:newLine color="blue" size="25"/>
</body>
</html>
'JSP' 카테고리의 다른 글
커스텀액션의 본체를 처리하는 태그파일 (0) | 2013.03.22 |
---|---|
동적 애트리뷰트를 지원하는 태그파일 (0) | 2013.03.22 |
태그파일을 이용해서 커스텀액션 만들기 (0) | 2013.03.22 |
JSTL DB연결하여 테이블 내용 가져오기 (1) | 2013.03.22 |
JSTL 함수 라이브러리 (0) | 2013.03.22 |