상세 컨텐츠

본문 제목

JSP 내가 태그 만들어서 써보기 2

관리X 과거글

by 까먹기전에 2015. 3. 31. 10:35

본문

반응형

<%@ page language="java" contentType="text/html; charset=EUC-KR"

pageEncoding="EUC-KR"%>

<%@ taglib prefix="myTags" tagdir="/WEB-INF/tags" %> 

<!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>

<myTags:car color="red" speed="100"/>

<myTags:car color="blue" speed="200"/>

</body>

</html>


======================================================================


<%@ tag language="java" pageEncoding="EUC-KR"%>

<%@ attribute name="color" required="true" %>

<%@ attribute name="speed" required="true" %>


<h1 style="color:${color}">색상 : ${color}</h1>

<h1>속도 : ${speed}</h1>


=======================================================================



관련글 더보기