카테고리 없음

[JSP] TemplatePage

너래쟁이 2018. 4. 16. 13:25



11_06_template

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
32
33
34
35
<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>
<!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>template.jsp</title>
</head>
<body>
 
 
 <%
    String content = request.getParameter("CONTENT");
    // 디폴트값 설정
    if(content == null) content = "11_04_newitem.jsp";
%>
 
 
<table border=1 cellpadding=10 align=center>
<tr>
    <td colspan="2" width=800 height="50">
        <jsp:include page="11_01_top.jsp"></jsp:include>
    </td>
</tr>
<tr>
    <td width="150"><jsp:include page="11_03_left.jsp"></jsp:include></td>
    <td width="650"><jsp:include page="<%= content %>" /></td>
                                <!-- content +'.jsp'  -->
</tr>
<tr>
    <td colspan="2"><jsp:include page="11_02_bottom.jsp"></jsp:include></td>
</tr>
</table>
</body>
</html>
cs


11_05_bestitem.jsp
1
2
3
4
5
6
7
8
9
10
11
12
<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>
<!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>application 예제</title>
</head>
<body>
베스트상품 목록입니다
</body>
</html>

cs


11_04_newitem.jsp
1
2
3
4
5
6
7
8
9
10
11
12
<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>
<!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>application 예제</title>
</head>
<body>
신상품 목록입니다
</body>
</html>
cs


11_03_left.jsp
1
2
3
4
5
6
7
8
9
10
11
12
13
<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>
<!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>left.jsp</title>
</head>
<body>
<a href="?CONTENT=11_04_newitem.jsp">신상품</a><br>
<a href="?CONTENT=11_05_bestitem.jsp">인기상품</a>
</body>
</html>
cs


11_02_bottom.jsp

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>
<!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>application 예제</title>
</head>
<body>
<center>
Since 2018
</center>
</body>
</html>
cs


11_01_top.jsp

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>
<!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>top.jsp</title>
</head>
<body>
<a href="10_1_login.jsp">Login</a>|
<a href="10_1_login.jsp">Join</a>
 
</body>
</html>
cs