タグを使用すると、目的の結果を得ることができます<jsp:include>
。
SharedContentBean.java
@UrlBinding("/sharedContent")
public class SharedContentBean implements ActionBean {
String contentParam;
@DefaultHandler
public Resolution view() {
return new ForwardResolution("/sharedContent.jsp");
}
}
JSPで
<!-- Import Registration Form here -->
<jsp:include page="/sharedContent">
<jsp:param value="myValue" name="contentParam"/>
</jsp:include>
web.xml
必ずweb.xmlのタグに追加INCLUDE
してください。<filter-mapping>
<filter-mapping>
<filter-name>StripesFilter</filter-name>
<url-pattern>/*</url-pattern>
<servlet-name>StripesDispatcher</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>