Skip to content

Commit 52bc04e

Browse files
committed
Add tag files.
1 parent 8fc36dd commit 52bc04e

File tree

5 files changed

+44
-0
lines changed

5 files changed

+44
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
encoding//WebContent/WEB-INF/tags/wrapper.tag=UTF-8
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<%@tag description="Overall Page template" pageEncoding="UTF-8"%>
2+
<%@attribute name="header" fragment="true"%>
3+
<%@attribute name="footer" fragment="true"%>
4+
<html>
5+
<body>
6+
<div id="pageheader">
7+
<jsp:invoke fragment="header" />
8+
</div>
9+
<div id="body">
10+
<jsp:doBody />
11+
</div>
12+
<div id="pagefooter">
13+
<jsp:invoke fragment="footer" />
14+
</div>
15+
</body>
16+
</html>

WebContent/WEB-INF/tags/wrapper.tag

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<%@tag description="Simple Wrapper Tag" pageEncoding="UTF-8"%>
2+
<html>
3+
<body>
4+
<jsp:doBody />
5+
</body>
6+
</html>

WebContent/example.jsp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<%@page contentType="text/html" pageEncoding="UTF-8"%>
2+
<%@taglib prefix="t" tagdir="/WEB-INF/tags"%>
3+
4+
<t:wrapper>
5+
<h1>Welcome</h1>
6+
</t:wrapper>

WebContent/example1.jsp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<%@page contentType="text/html" pageEncoding="UTF-8"%>
2+
<%@taglib prefix="t" tagdir="/WEB-INF/tags"%>
3+
4+
<t:genericpage>
5+
<jsp:attribute name="header">
6+
<h1>Welcome</h1>
7+
</jsp:attribute>
8+
<jsp:attribute name="footer">
9+
<p id="copyright">Copyright 1927, Future Bits When There Be Bits Inc.</p>
10+
</jsp:attribute>
11+
<jsp:body>
12+
<p>Hi I'm the heart of the message</p>
13+
</jsp:body>
14+
</t:genericpage>

0 commit comments

Comments
 (0)