대부분의 경우 2개의 처리단계(Phase)로 나누어진다. 먼저 먼가 업데이트를 하거나 데이터를 추출하고, 두번째 단계로 그 내용을 표시한다. Action클래스가 업데이트나 데이터 추출을 담당하고, Result Type이 표시를 담당한다. 기본 제공되는 Result 타입 스트럿츠 2 에서 제공되는 기본 Result 타입은 아래와 같다. Result 클래스는 com.opensymphony.xwork2.Result 를 구현한 클래스이다.
옵션 Result 타입 JasperReposts Plugin : Jasper 로 표현할 때 사용한다. Additional Result Types can be created and plugged into an application by implementing the com.opensymphony.xwork2.Result interface. Custom Result Types might include generating an email or JMS message, generating images, and so forth. 디폴트 파라메터 To minimize configuration, Results can be configured with a single value, which will be converted into a parameter, and each Result can specify which parameter this value should be set as. For example, here is a result defined in XML that uses a default parameter: <result type="freemarker">foo.fm</result> That is the equivalent to this: <result type="freemarker"> <param name="location">foo.vm</param> </result> Since probably 95% of your actions won't need results that contain multiple parameters, this little shortcut saves you a significant amount of configuration. It also follows that if you have specified the default parameter, you don't need to set the same parameter as a specifically-named parameter. Result 타입 등록하기 All Result Types are plugged in via the Result Configuration. |