| Name | Description | |
| bufferSize | 파일 업로드 시 사용하는 입력 버퍼의 크기. 이 속성은 선택적으로 사용할 수 있다.
디폴트 값 : 4096 |
|
| className | 컨트롤러 정보를 포함한 Config 빈을 구현하는 클래스의 full name.
org.apache.struts.config.ControllerConfig를 상속받은 클래스이어야 한다.
디폴트 값 : org.apache.struts.config.ControllerConfig |
|
| contentType | Response 결과를 보낼 때 사용하는 컨텐트 타입. 이 속성은 선택적으로 사용.
이 속성에 지정한 값이 있더라도 액션이나 JSP 페이지에서 지정한 컨텐트 타입이 우선한다.
디폴트 값 : text/html |
|
| forwardPattern | /로 시작하는 (contextRelative 속성이 false일 경우) context-relative URL과 <forward>의 'path'속성이 어떻게 매핑되는지에 대한 대체 패턴.
이 값은 아래 항목의 조합으로 이루어진다.
|
|
| inputForward | <action>의 input attribute를 최종 URL로 사용할 forward 또는 global-forward의 이름이길 원하면 true로 설정한다.
false 이면 sub application의 상대경로로 간주한다.
디폴트 값 : false |
|
| locale | 사용자의 locale정보를 사용자 세션에 저장할지 여부 디폴트 값 : true |
|
| maxFileSize | 파일 업로드 시 파일의 최대 용량으로 K,M,G 단위를 붙여 사용한다.
디폴트 값 : 250M |
|
| multipartClass | Multipart 요청에 대한 처리를 담당하는 클래스의 전체 이름. 파일 업로드 시 사용.
디폴트 값 : org.apache.struts.upload.CommonsMultipartRequestHandler |
|
| nocache | Response에서 HTTP 헤더를 'nocache'로 설정 할 지에 대한 Boolean 값. Optional
디폴트 값 : false |
|
| pagePattern | 커스텀 태그를 사용하는 페이지의 page 속성이 컨텍스트 상대 URL 경로에 매핑 방법에 대한 대체 패턴. 이 속성의 값은 아래 항목들로 구성된다.
|
|
| processorClass | 사용자의 요청을 처리할 클래스의 full name. 여기에 지정한 클래스는 org.apache.struts.action.RequestProcessor
클래스의 하위 클래스가 된다.
디폴트 값 : org.apache.struts.chain.ComposableRequestProcessor |
|
| tempDir | 파일 업로드 시 사용할 임시 디렉터리. Optional
디폴트 값 : Servlet container가 제공하는 디렉터리 |
<controller contentType="text/html;charset=utf-8" locale="true" nocache="true" processorClass="org.apache.struts.action.RequestProcessor" />
| Name | Description |
| className | message-resources의 정보를 포함하는 설정 빈을 구현하는 클래스 이름. 여기에 지정한 클래스는
org.apache.struts.config.MessageResourcesConfig 클래스의 하위 클래스여야 한다.Optional.
디폴트 값 : org.apache.struts.config.MessageResourcesConfig |
| factory | 사용할 MessageResourcesFactory 클래스의 이름.
디폴트 값 : org.apache.struts.util.PropertyMessageResourcesFactory |
| key | 메시지 리소스 번들이 저장될 ServletContext 속성. 이 속성은 optional.
디폴트 값 : org.apache.struts.action.MESSAGE |
| null | 정의되지 않은 메시지 키가 사용된 경우 이를 MessageResources의 하위 클래스에서 어떻게 처리할지 나타내는 Boolean 값.
false로 설정하면 null이 아닌 "???keyname???" 과 같은 문자열을 되돌려준다.
디폴트 값 : true |
| parameter | 리소스 번들의 이름. 예를 들어, 리소스 번들 이름이 ApplicationResources.properties 이면 이 속성의 값은 ApplicationResources가 된다. 이 속성은 반드시 정의해야 한다. 만일 리소스 번들이 패키지화되어 있다면 해당 패키지의 이름을 포함한 전체 이름을 지정해야 한다. |
<message-resources parameter="anyframe.sample.struts.web.common.SampleResources"/>
org.apache.struts.action.PlugIn 인터페이스를 구현하는 자바 클래스를 생성한 후 설정 파일에 plug-in 요소를 추가하여 사용 가능| Name | Description |
| className | Plug-In 클래스의 전체 이름을 나타내며, 해당 클래스는 반드시 org.apache.struts.action.PlugIn 인터페이스를 구현해야 한다.
|
<plug-in className="org.apache.struts.tiles.TilesPlugin"> <set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml"/> </plug-in>
| Name | Description |
| className | Form bean들의 configuration 정보를 담고 있을 객체이다.반드시 org.apache.struts.config.FormBeanConfig를 상속 받은 클래스여야 한다.
디폴트 값 : org.apache.struts.config.FormBeanConfig |
| dynamic | Form bean의 type attribute가 org.apache.struts.action.DynaActionForm이거나 org.apache.struts.action.DynaActionForm을 상속 받아
구현한 클래스이면, 이 attribute는 true여야 한다.
디폴트 값 : false |
| name | 이 form bean의 이름이고, 다른 form bean들과 구분될 수 있는 identifier이다. [required] |
| type | 이 form bean의 구현 클래스를 나타낸다. 이 클래스는 ActionForm의 서브클래스여야 한다. [required] |
| Name | Description |
| className | Form property들의 configuration 정보를 담고 있을 객체이다.
반드시 org.apache.struts.config.FormPropertyConfig 또는 이를 상속 받은 클래스여야 한다.
디폴트 값 : org.apache.struts.config.FormPropertyConfig |
| initial | 이 property의 initial 값을 나타내고, 문자로 표현된다. |
| name | Form bean이 사용하는 이 property의 이름이다. [required] |
| size | Form property의 type attribute가 array일 경우에, 그 array elements의 개수를 나타낸다. |
| type | Form bean이 사용하는 이 property의 type이다. 다음은 DynaActionForm에서 지원하는 type이다.
|
<form-beans> <form-bean name="helloForm" type="com.sds.helloapplication.forms.HelloForm"> </form-bean> <form-bean name="employeeForm" type="org.apache.struts.action.DynaActionForm"> <form-property name="name" type="java.lang.String"/> <form-property name="age" type="int"/> <form-property name="department" type="java.lang.String" initial="2"/> <form-property name="flavorIDs" type="java.lang.String[]"/> </form-bean> </form-beans>
| Name | Description |
| attribute | Form bean에 접근하기 위한, request-scope 또는 session-scope attribute의 name 값이다. 사용할 form bean을 다른 attribute의 이름으로 사용하고자 할 때 사용한다. Form bean이 name attribute에 기술되어 있을 때에만 기술될 수 있다. |
| className | Action들의 configuration 정보를 담고 있을 객체이다. 반드시 org.apache.struts.config.ActionMapping 또는 이를 상속 받은 클래스여야 한다.
디폴트 값 : org.apache.struts.config.ActionMapping |
| forward | 요청된 request를 Action 클래스 대신하여 수행할 resource(*.do, *.jsp 등)의 상대(module-relative) 경로를 나타낸다. [required: 반드시 forward, include, type attribute 중의 하나만 기술되어야 한다.] |
| include | 요청된 request를 Action 클래스 대신하여 수행할 resource(*.do, *.jsp 등)의 상대(module-relative) 경로를 나타낸다. [required: 반드시 forward, include, type attribute 중의 하나만 기술되어야 한다.] |
| input | Form bean에서 validation error가 발생했을 때, 이를 나타낼 resource(*.do, *.jsp 등)의 상대(module-relative) 경로를 가리킨다. Form bean이 name attribute에 기술되어 있을 때에만 기술될 수 있다. [required: form bean이 name attribute에 기술되어 있고 validation error들을 리턴할 경우] |
| name | 이 action 매핑 사용하는 form bean의 이름을 나타낸다. |
| path | Submit된 request의 상대(module-relative)경로를 나타낸다. 이 attribute는 반드시 "/"으로 시작해야 하고, filename의 확장자 없이 기술되어야 한다. 예를 들어, "/main.do"은 적절한 path attribute의 기술 방법이 아니다. 왜냐하면 이미 do라는 확장자가 action 매핑에 사용되고 있는 것을 알고 있기 때문에, "/main"이라고만 기술하는 것이 옳다. [required] |
| parameter | Action 객체에 특별한 어떤 값을 넘겨주기 위한 설정 parameter이다. 현 Action 클래스에서는 이 attribute를 이용하지 않고 있기 때문에, 값을 넣는다 해도 처리되지 않는다. 만약 이 attribute를 사용하고자 하면, Action 클래스의 서브클래스를 만들어 구현해야 한다. |
| prefix | Request parameter name을 form bean property name에 매치시키는 데 사용되는 prefix를 나타낸다. Form bean이 name attribute에 기술되어 있을 때에만 설정할 수 있다. |
| roles | Action 객체에 접근할 수 있는 권한을 설정한다. 여러 role 이름들은 콤마(,)로 구분하여 쓸 수 있다. 예를 들어, "admin, master, user"라고 써주면 admin, master, user의 세 가지 권한 중 어느 한가지 권한이라도 가진 사용자는 이 action을 사용할 수 있게 된다. |
| scope | 이 action이 사용하는 form bean이 저장되어 있는 context의 scope를 나타낸다. request 또는 session.
디폴트 값 : session |
| suffix | Request parameter name을 form bean property name에 매치시키는 데 사용되는 suffix를 나타낸다. Form bean이 name attribute에 기술되어 있을 때에만 설정할 수 있다. |
| type | 요청된 request를 수행할 Action 클래스를 나타낸다. 이 클래스는 org.apache.struts.action.Action의 서브클래스여야 한다.
[required: 반드시 forward, include, type attribute 중의 하나만 기술되어야 한다.]
|
| unknown | 설정 파일에 정의되지 않은 request를 처리하는 default action 매핑인지 여부를 나타낸다.
요청된 request를 수행할 action 매핑 객체가 없을 경우에, unknown이 true로 설정된 action 매핑 객체에게 이 request를 넘겨 처리하게 한다.
각각의 module마다 unknown이 true인 action 매핑은 하나만 있을 수 있다.
디폴트 값 : false |
| validate | Form bean에서 validation을 수행할지 여부를 나타낸다.
이 값이 true이면, form bean의 validate 메소드가 실행된다.
디폴트 값 : true |
| cancellable | Struts 1.3에 추가된 attribute로 Struts 1.2.9에서 <set-property>로 설정했던 것이 1.3부터 바뀌었다. Cancel Process를 사용하기 위해서 설정해야 한다. |
<action-mappings> <action path="/login" type="anyframe.sample.struts.web.action.LoginAction" name="userForm" scope="request" input="/basic/login.jsp"> <exception key="error.password.mismatch" path="/basic/login.jsp" type="javax.security.auth.login.FailedLoginException" /> <forward name="success" path="/basic/main.jsp" /> </action> ... </action-mappings>
| Name | Description |
| className | Forward들의 configuration 정보를 담고 있을 객체이다. org.apache.struts.config.ActionForward 또는 이를 상속 받은 클래스여야 한다.
디폴트 값 : org.apache.struts.config.ActionForward |
| name | 현재 forward의 이름이고, 다른 forward들과 구분될 수 있는 identifier이다. [required] |
| path | Forward 또는 redirect할 resource(*.do, *.jsp 등)의 상대(module-relative or context-relative)경로를 나타낸다. [required] |
| redirect | RequestProcessor가 이 forward에 대해 redirect할 필요가 있을 때, true로 설정한다.
디폴트 값 : false |
<global-forwards>
<forward name="login" path="/login.jsp"/>
<forward name="main" path="/main.do" redirect="true"/>
</global-forwards>
| anyframe-struts-sample-basic.zip |