I simplified your test case further:
package test;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;
public class TTag extends TagSupport {
@Override
public int doStartTag() throws JspException {
try {
pageContext.getOut().write("Including test.jsp ");
pageContext.include("test.jsp", true);
pageContext.getOut().write("After test.jsp ");
} catch (Exception e) {
throw new JspException(e);
}
return EVAL_BODY_AGAIN;
}
}
The include works as expected. No idea why it didn't work for you.
BTW, doStartTag should not return EVAL_BODY_AGAIN, it should return either SKIP_BODY or EVAL_BODY_INCLUDE.
[Message sent by forum member 'kchung']
http://forums.java.net/jive/thread.jspa?messageID=473452