Struts2

2009/02/02 20:27
Struts2 : MVC구조

web.xml -> FilterDispatcher등록
</display-name> //닫은후
<filter>
  <filter-name>struts</filter-name>
  <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
 </filter>
<filter-mapping>
  <filter-name>struts</filter-name>
  <url-pattern>/*</url-pattern>
 </filter-mapping>


Struts.xml =>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">

==============================================================================
<!ELEMENT member (list+)>
+ : list 태그 1번 이상
* : 0번 이상
==============================================================================
<struts>
 <package name="exam" namespace="/exam" extends="struts-default">
                                           //해당 폴더 영역 결정(jsp폴더명)
  <action name="list" class="my.action.ListAction">   //action이 들어오면 class 수행
   <result name="success">/exam/list.jsp</result>  //결과보낼 페이지
   <result name="error">/exam/error.jsp</result>  //결과보낼 페이지
  </action>
 </package>
</struts>
==============================================================================
<%@
 taglib prefix="s" uri="/struts-tags"
 %>
prefix : 접두어(s로 시작되는 태그)

'Study > Java Project' 카테고리의 다른 글

Struts2  (0) 2009/02/02
Ajax 코딩 방식  (0) 2009/01/30
커넥션풀 셋팅  (0) 2009/01/19
JSP 내장객체  (0) 2009/01/06
Posted by 黑霧
<< PREV : [1] : [2] : [3] : [4] : [5] : ... [18] : NEXT >>

BLOG main image
† 기나긴 여행을 하다 † by 黑霧

달력

«   2009/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  

글 보관함

공지사항

최근에 받은 트랙백

Total : 1,533
Today : 1 Yesterday : 0