본문 바로가기
Programming/Struts

global-forwards

by 막이 2012. 9. 12.

중복되는 forward를 재사용 (여러 forward를 하나로 통합한다)

- struts-config.xml 수정

    global-forwards의 위치는 action-mappings 위.

    <!ELEMENT struts-config (display-name?, description?, form-beans?, global-exceptions?, 
    global-forwards?, action-mappings?, controller?, message-resources*, plug-in*)>

 <global-forwards>
           <forward name="list" path="/list.jsp"/>
 </global-forwards>

 <action-mappings>
    <action   path="/list" type="test.web.ListCommandAction">
    <!-- <forward name="list"  path="/list.jsp" /> -->  
    <-- 액션안의 forward를 global-forward 로 대신한다.
 </action>


 

'Programming > Struts' 카테고리의 다른 글

Struts taglib  (0) 2012.09.12
struts web.xml 설정 태그  (0) 2012.09.12
struts-config.xml 파일 정보  (0) 2012.09.12