Get the view from the current container, and map the name of this
include to a page to include in that view
// find the Container tag and get the view from it
ContainerTag ct =
(ContainerTag) findAncestorWithClass(this, ContainerTag.class);
View v = ct.getView();
// get the url for this view
String viewURL = v.getUrl(ct.getName(), name);
if (viewURL != null) {
try {
// include it
pageContext.include(viewURL);
} catch( Exception ex ) {
throw new JspException("Unable to include " + viewURL, ex);
}
}
return EVAL_PAGE;