in action.Test1
public class Test1 extends ActionSupport {
public String execute() {
addActionMessage("Hello in test2");
return SUCCESS;
} else {
addActionError("Please try again");
return INPUT;
}
}
struts.xml で
<action name="test1" class="action.Test1">
<result name="success" type="redirect">test2</result>
</action>
<action name="test2" class="action.Test2">
<result name="success">/test2.jsp</result>
</action>
表示ActionMessage
したい ActionError
test2.jsp