programming/jsp

[JSP] 스트럿츠 활용 예제



23-2. 스트럿츠 활용 예제


1. 회원관리 실습 소스


1.1 struts.xml

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE struts PUBLIC

"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"

"http://struts.apache.org/dtds/struts-2.0.dtd">


<struts>

<include file="/config/sturts_test.xml" />

<include file="/config/struts_member.xml" />

</struts>


1.2 struts_member.xml

1.3 sqlMapConfig.xml

1.4 MemberDTO.java

1.5 MemberDAO.java

1.6 member.xml

1.7 회원관리.sql

1.8 member.xml

1.9 MemberAction.java

1.10 JoinAction.java

1.11 login.jsp

1.12 main.jsp

1.13 join.jsp

1.14 userid_check.jsp

1.15 member_list.jsp

1.16 member_add.jsp

1.17 member_view.jsp


2. 한줄메모장 실습 소스


2.1 struts.xml

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE struts PUBLIC

"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"

"http://struts.apache.org/dtds/struts-2.0.dtd">


<struts>

<include file="/config/sturts_test.xml" />

<include file="/config/struts_member.xml" />

<include file="/config/struts_memo.xml" />

</struts>


2.2 struts_memo.xml

2.3 sqlMapConfig.xml

2.4 MemoDTO.java

2.5 MemoDAO.java

2.6 memo.xml

2.7 MemoAction.java

2.8 memo_list.jsp

2.9 memo_view.jsp