JSP _actionTag(JavaBean)_page1

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import = "choi_jsp_basic.user.UserVo_actionTag" %>



<jsp:useBean id="user" class = "choi_jsp_basic.user.UserVo_actionTag" scope="request"/>    


<%--오로지 actionTag를이용하여 한방에 받기  --%>
<jsp:setProperty name = "user" property="*"/>





<%--오로지 actionTag를이용하여 받고 보내주기 --%>
<%String id= request.getParameter("id");
String pw= request.getParameter("pw");
String name= request.getParameter("name");
String email= request.getParameter("email");%>
<jsp:setProperty name="user" property="id" value=<%=id %>/>
<jsp:setProperty name="user" property="pw" value=<%=pw %>/>
<jsp:setProperty name="user" property="name" value=<%=name %>/>
<jsp:setProperty name="user" property="email" value=<%=email %>/>

<%




//actionTag를 이용한 방식
//<jsp:useBean id="user" class = "choi_jsp_basic.user.UserVo_actionTag" scope="request"/>    
//user.setId(request.getParameter("id"));
//user.setId(request.getParameter("pw"));
//user.setId(request.getParameter("name"));
//user.setId(request.getParameter("email"));








//생성자를 활용한 방식의 값 받고 보내기 
//UserVo_actionTag user = new UserVo_actionTag(
		//request.getParameter("id"),
		//request.getParameter("pw"),
		//request.getParameter("name"),
		//request.getParameter("email")
		//);



//action_tag를 사용 하지 않았을 때 사용 방법 값 저장
//request.setAttribute("user_id", request.getParameter("id"));
//request.setAttribute("user_pw", request.getParameter("pw"));
//request.setAttribute("user_name", request.getParameter("name"));
//request.setAttribute("user_email", request.getParameter("email"));

%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>

<jsp:forward page = "VO_ACTIONTag/vo_use.jsp"/>

</body>
</html>

좋은 웹페이지 즐겨찾기