태터데스크 관리자

도움말
닫기
적용하기   첫페이지 만들기

태터데스크 메시지

저장하였습니다.

'2009/06/21'에 해당되는 글 1건

  1. 2009/06/21 struts-config Elements (7)

<display-name>
<!-- 자유롭게 기술, '<','>','&' 등의 특수문자는 <![CDATA[...]]>안에 기술 -->
<!-- <description> 자유롭게 기술, '<','>','&' 등의 특수문자는 <![CDATA[...]]>안에 기술 -->

<data-sources>
 <data-source>
  <set-property property="autoCommit" value="true"/>
  <set-property property="description" value="My Data Source"/>
  <set-property property="driverClass" value="com.mysql.jdbc.Driver"/>
  <set-property property="maxCount" value="10"/>
  <set-property property="minCount" value="4"/>
  <set-property property="user" value="username"/>
  <set-property property="password" value="password"/>
  <set-property property="url" value="jdbc:mysql://localhost:3306/database"/>
 </data-source>
</data-sources>

<!--
DataSource dataSource =  (DataSource)servlet.getServletContext().getAttribute(Action.DATA_SOURCE_KEY);
-->

<form-beans>
 <form-bean name="boardForm" type="forms.BoardForm">
 <form-bean name="listForm" type="forms.listForm">
</form-beans>

<!--
form-bean에 정의된 내용은 org.apache.struts.action.ActionFormBean클래스에 저장된다.

form-bean의 속성들

className : ActionFormBean을 상속했을 경우에 생성한 클래스명을 기록
dynamic : DynaActionForm을 사용할 경우 true로 지정
name : 생성한 액션폼의 인스턴스명 정의
type : 생성한 액션폼의 패키지명을 포함한 클래스명을 기록

form-bean의 하위 요소들

icon : GUI Tool을 사용할 경우 표시될 icon 이미지의 경로
display-name : GUI Tool을 사용할 경우 표시될 이름
description : form-bean의 설명
set-property : form-bean 속성으로 className이 지정된 경우 전달된 변수
form-property : DynaActionForm을 사용할 경우 DynaActionForm이 가질 변수들을 정의
-->

<global-exceptions>
 <exception type="exception.BoardException" key="exception.board" scope="request" path="/exception/BoardMessages.jsp"/>
</global-exceptions>

<!--
exception의 속성들

bundle : locale 값에 해당하는 에러메시지를 출력할 경우 사용할 프로퍼티 지정
className : ExceptionConfig를 상속했을 경우에 생성한 클래스명을 기록
handler : ExceptionHandler를 상속했을 경우에 생성한 클래스명을 기록
key : 출력할 에러메시지의 프로퍼티의 key를 기록
path : 예외가 발생했을 경우 forward 할 경로를 기록
scope : ActionError를 저장할 스코프 기록
type : exception을 처리할 클래스명

exception의 하위 요소들

icon : GUI Tool을 사용할 경우 표시될 icon 이미지의 경로
display-name : GUI Tool을 사용할 경우 표시될 이름
description : exception의 설명
set-property : exception 속성으로 className이나 handler를 지정한 경우 전달된 변수
 -->

<global-forwards>
 <forward name="common" path="/index.jsp" redirect="false"/>
</global-forwards>

<!--
module내에서 공통적으로 사용할 forward를 정의
forwards요소에 정의된 값은 org.apache.struts.action.ActionForward에 저장됨

forward의 속성들

className : ActionForward를 상속받은 클래스명을 기록
contextRelative : "true"로 지정할 경우 application의 Context path로 부터 경로가 사용된다
module : path 속성으로 지정된 경로가 여기에 지정된 경로의 상대경로로 사용된다.
name : Action에서 사용할 논리적인 이름
path : forward의 실제 경로
redirect : 초기화를 해서 forward를 할 경우 사용
 -->

<action-mappings>
 <action path="/login" type="org.apache.struts.actions.ForwardAction" scope="request" parameter="/login/login.jsp" validate="false"/>
 <action path="/loginProc" type="actions.LoginAction" name="loginForm" scope="request" input="/login/login.jsp" validate="true">
  <forward name="success" redirect="false" path="/member/main.jsp"/>
  <forward name="success" redirect="false" path="/member/main.jsp"/>
 </action>
</action-mapping>

<!--
struts-config.xml의 가장 중요한 요소로 org.apache.struts.action.ActionMapping에 저장된다.
attribute : ActionForm의 이름, 지정하지 않으면 name 속성에서 지정한 이름을 사용한다.
className : ActionMapping을 상속받은 클래스명을 기록
forward : 포워드할 경로를 지정
include : 인클루드할 경로를 지정
input : ActionForm에서 에러가 발생하면 되돌아갈 경로 지정
name :  ActionForm의 이름
path :  <action> 요소가 매핑 될 request경로
parameter : Action에 전달해줄 변수, mapping.getParameter()메소드를 통해서 사용
prefix : reqeust 파라메터 중에서 특정 이름으로 시작하는 변수만 ActionForm에서 사용할 때 사용, name 속성이 지정되어 있어야 한다. 예) prefix="mem_"
suffix : reqeust 파라메터 중에서 특정 이름으로 끝나는 변수만 ActionForm에서 사용할 때 사용, name 속성이 지정되어 있어야 한다. 예) prefix="Shop"
roles : 특정 사용자만 접근하도록 할 때 사용, 예) role="admin,manager"
type : Action 클래스명
unknown : "true"로 지정하면 정의되지 않은 요청 경로가 있을 경우 기본으로 호출 될 경로로 사용, module 안에서 한개만 사용할 수 있다
validate : "true"로 지정하면 ActionForm의 validate()를 호출한다.

action의 하위 요소들

icon : GUI Tool을 사용할 경우 표시될 icon 이미지의 경로
display-name : GUI Tool을 사용할 경우 표시될 이름
description : action의 설명
set-property : action의 속성으로 className을 지정한 경우 ActionMapping에 전달된 변수
exception : Action 내에서 발생할 수 있는 exception 처리를 지정
forward : Action 내에서 선택할 수 있는 ActionForward를 지정
 -->

<controller contentType="text/html; charset=utf-8" locale="true"/>

<!--
bufferSize : 파일 업로드를 처리할 때 사용할 버퍼 메모리 크기, default값 4096Byte
className  : ControllerConfig를 상속받은 클래스명을 기록
contentType : module의 기본 컨텐츠타입 지정, default값 "text/html", 다국어를 위해 "text/html; charset=utf-8"을 사용하는 것을 권장
forwardPatten : forward 요소의 path 속성이 "/"로 시작하고 contextRelative가 true인 경우의 매핑을 정의, default 값은 $M$P로 되어 있음,
"$M" : module prefix를 매핑
"$P" : forward요소의 path 속성을 매핑
"$$" : '$'문자를 매핑
inputForward : "true"로 지정하면 global-forward 또는 action의 forward 요소의 이름을 action의 input 속성의 값으로 사용한다. default값은 "false"이며 action의 input 속성 값으로 action의 path를 사용한다.
locale : "true"로 지정하면 사용자의 locale 값을 세션에 저정한다.
maxFileSize : 업로드 파일의 최대 크기를 지정, "K", "M", "G"단위를 사용, default 값은 "250M"
memFileSize : 메모리에 보관할 업로드 파일의 최대 크기를 지정, 파일의 크기가 이 값보다 크면 tempDir에 저장함, default값은 "250K"
multipartClass : multipart request를 처리할 클래스명, 지정하지 않으면 CommonsMultipartRequestHandler가 사용됨
nocache : "true"로 지정하면 Browser의 캐시기능을 사용하지 않음
pagePattern : struts tag library의 page 속성에 대한 패턴 정의,  default값은 "$M$P"
processorClass : RequestProcessor를 상속받은 클래스명을 기록
tempDir : 파일 업로드에 사용하는 임시폴더
 -->

<message-resource parameter="resource/Messages"/>

<!--
className : MessageResourcesConfig를 상속받은 클래스명을 기록
factory : MessageResourcesFactory를 상속받은 클래스명을 기록, default값은 PropertyMessageResourcesFactory를 사용
key : 메시지 리소스가 ServletContext에 저장될때 사용될 이름, default값은 Globals.MESSAGES_KEY, 루트 모듈이 아닌 하위 모듈일때에는 "/"와 모듈 접두사(모듈명)가 key값 뒤에 붙는다.
null : "true"로 지정하면  메시지 key가 없을 때 null을 반환
parameter : MessageResourcesFactory에 전달할 메지지 프로퍼티 지정
 -->

 <plug-in className="org.apache.struts.tiles.TilesPlugin">
 <set-property property="definition-config" value="/WEB-INF/tiles/tiles-defs.xml"/>
 <set-property property="definitions-debug" value="2"/>
 </plug-in>
  <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
 <set-property property="pathnames" value="/WEB-INF/validator/validator-rules.xml,/WEB-INF/validator/validator.xml"/>
 </plug-in>




출처 : 파워유저가 알려주는 스트럿츠프로그래밍, 137-148, 가메출판사

top

Trackback Address :: http://www.ssial.com/trackback/287 관련글 쓰기

  1. Ray Ban Sunglasses 2012/04/16 16:36 댓글주소 | 수정/삭제 | 댓글

    Ray Ban Sunglasses http://www.raybansuk.uk.net/ Ray Ban 3025 http://www.raybansuk.uk.net/ray-ban-3025 http://www.ukmulberrybagssale.co.uk http://www.nbajerseysonline.com

  2. Nike Dunks 2012/04/16 17:22 댓글주소 | 수정/삭제 | 댓글

    Nike and the NFL have officially announced their partnership, many of the projects we’d all hoped would come to life may be on the horizon. The two juggernauts unveiled the new Nike Sb Dunks Elite 51 uniforms along with a few other joints ventures in the realm of fan gear, events, and now sneakers. That’s right, the NFL has offered up the full 32 team logos for the Nike iD treatment. Yep, this will be about as fun as it sounds.
    As you would come to expect with the Nike iD process, sneaker enthusiast can customize the shoes to their liking. The Nike Dunks High will act as the canvas for the iD venture with both coloring and team logo’s present. Clearly this partnership is one that will be lucrative to the brands involved and beyond exciting for fans and consumers.

  3. Oakley Frogskins Sale 2012/04/18 17:46 댓글주소 | 수정/삭제 | 댓글

    Cool site! Thanks for the information! I like this article.

  4. coach outlet 2012/04/24 11:02 댓글주소 | 수정/삭제 | 댓글

    Dior can make your life bright.

  5. cheap ray ban sunglasses 2012/05/10 21:40 댓글주소 | 수정/삭제 | 댓글

    The reasons the pioneer remember that, at this moment ray ban sunglasses and then the big eyes possess gone up to your brand-new elevation to get several folks, [url=http://www.ray-ban-sunglasses-outlet.com/][b]ray ban sunglasses sale[/b][/url] has developed into a must of this mobile your life. Right now a fad is ray ban Dahon society. Until recently, wasn’t able to move your black-framed emulate, thought he would stop a rather long body oppression of this instances, did start to take on your sunglasses set.Through summer, in case ray ban sugnalsses kitten in your family car at the dashboard, ray ban sunglasses may well be heat deformation, accumulate, is absolutely not winter eating plan mode shades practically sunglasses could be harmed. Hold corrosive synthetics, but more basic create a mode gets stained as well as deformed, [url=http://www.ray-ban-sunglasses-outlet.com/][b]ray ban outlet[/b][/url] glasses layer simply by deterioration whether they unintentionally dirtied aided by the requirement of regular over which includes a exclusive maintaining pad or maybe glasses cleanup newspaper for you to dried up

  6. cheap ray ban sunglasses 2012/05/10 21:41 댓글주소 | 수정/삭제 | 댓글

    A little bit ago, would not grow this black-framed vanity mirror, chosen to conclude all the very long figure oppression within the circumstances, begun to require this [url=http://www.cheapraybanaviatorsunglassessale.com/][b]ray ban wayfarer sunglasses[/b][/url] tier. During summer, in the event ray ban cover while in the car or truck over the dashboard, ray ban may perhaps be arctic deformation, specially, will not be winter food framework sun glasses more or sunglasses shall be weakened.ray ban in addition to spectacles or contact lenses usually are a very similar. ray ban upgraded lenses smirch, petrol, or maybe finger prints readily available focused nice and clean wash cloth and also zoom lens housecleaning documents to eradicate mud or perhaps dirt and grime over the [url=http://www.cheapraybanaviatorsunglassessale.com/][b]ray ban sunglasses sale[/b][/url] contact lenses

  7. michael kors handbags 2012/05/12 11:10 댓글주소 | 수정/삭제 | 댓글

    And now jordan 5 for sale price on our website is very concessional.The new In 2012, this body and mind to lead the theme of the 2012 spring jordan 11 for sale products.The Parksonjordan 1 for sale to strengthen the foot tenacity, nike air penny 1 flexibility and balance,kobe shoes 2012 so that the muscles become more robust.The new In 2012,jordan 13 for sale never let you wear do not want to take off.The center is located at the michael kors outlet constructed exit off Interstate 575 at michael kors handbags Parkway. Michael kors watches outlet will take place over the next few months with structural work beginning later michael kors wallets outlet summer, the companies said.The companies said they expect to michael kors bags on sale in the near future.

Write a comment