tiles:insert で SAStrutsのActionの結果を挿入する。(できた)

nullを返す場合、Requestへのセットはやらないんですね。

SAStrutsのチュートリアルのlayoutを使う事を想定

package tutorial.action;

import javax.annotation.Resource;

import org.seasar.struts.annotation.ActionForm;
import org.seasar.struts.annotation.Execute;
import org.seaser.struts.util.RequestUtil;

import tutorial.form.IncludeTestForm;

public class IncludeTestAction {
    
    @ActionForm
    @Resource
    IncludeTestForm includeTestForm;

    @Execute(validator=false)
    public String index() {
        includeTestForm.message = "index";
        return "index.jsp";
    }
    
    @Execute(validator=false)
    public String included() {
        RequestUtil.getRequest.setAttribute("message", "included");
        return null;
    }
}
<%@page pageEncoding="UTF-8"%>
<tiles:insert template="/WEB-INF/view/common/layout.jsp" flush="false">
<tiles:put name="title"  value="Tiles"/>
<tiles:put name="content" type="string">
   <p>${f:h(message)}</p>
   <tiles:insert controllerUrl="/includeTest.do?SAStruts.method=included" page="included.jsp" flush="false"/>
</tiles:put>
</tiles:insert>
<%@page pageEncoding="UTF-8"%>
<p>${f:h(message)}</p>
  • 出力結果
index
included