Notice
Recent Posts
Recent Comments
Link
«   2024/07   »
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
Tags
more
Archives
Today
Total
관리 메뉴

WON.dev

chapter01 : include 1 / include 2 본문

JSP/ACTION.BEAN

chapter01 : include 1 / include 2

GAWON 2023. 5. 23. 19:15
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<h1>include1.jsp 페이지</h1>
	
	<br><hr><br>
	
	<%-- Ex01_include1.jsp 페이지에 Ex01_include2.jsp페이지를 포함 --%>
	
	<%--1. include 지시어 --%>
	<%@ include file="Ex01_include2.jsp" %>

	<%-- 2.include 액션 태그 --%>
	<jsp:include page="Ex01_include2.jsp">
		<jsp:param name="name" value="김씨"/>
		<jsp:param name="age" value="20"/>
		<jsp:param name="addr" value="서울"/>
	</jsp:include>
	
	
</body>
</html>
 <%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	request.setCharacterEncoding("utf-8");
	String name = request.getParameter("name");
	String age = request.getParameter("age");
	String addr = request.getParameter("addr");
%>

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<h1>include2.jsp페이지</h1>
	<div>
		이름 : <%=name %>
		나이 : <%=age %>
		주소 : <%=addr %>
	</div>

</body>
</html>

'JSP > ACTION.BEAN' 카테고리의 다른 글

chapter03 : useBean1 / useBean2  (0) 2023.05.23
chapter02 : DTO  (0) 2023.05.23
action.bean : PersonVO  (0) 2023.05.23
action.bean : MemberDTO.java  (0) 2023.05.23
action  (0) 2023.05.23