package tutorial.action;

import javax.annotation.Resource;

import org.seasar.struts.annotation.ActionForm;
import org.seasar.struts.annotation.Execute;
import org.seasar.struts.exception.ActionMessagesException;

import tutorial.form.AddForm;

public class AddAction {

    public Integer result;

    @ActionForm
    @Resource
    protected AddForm addForm;

    @Execute(validator = false)
    public String index() {
        return "index.jsp";
    }

    @Execute(input = "index.jsp", removeActionForm = true)
    public String submit() {
        result = Integer.valueOf(addForm.arg1) + Integer.valueOf(addForm.arg2);
        throw new ActionMessagesException("errors.required", "hoge");
        // return "index.jsp";
    }
}
@@ -156,69 +156,8 @@
 te;%0D
-%0Aimport org.seasar.struts.exception.ActionMessagesException;%0D
 %0A%0D%0Ai
@@ -448,33 +448,8 @@
 jsp%22
-, removeActionForm = true
 )%0D%0A 
@@ -569,82 +569,8 @@
     
- throw new ActionMessagesException(%22errors.required%22, %22hoge%22);%0D%0A        //
  ret

テストしたときの内容が間違ってコミットされていたのを修正。