Sharpen your pencil
Look at the code below and figure out what prints when you bring up PageA.
Hint: look in the API for javax.servlet.jsp.SkipPageException.
Fill in what you’ll see in the browser:
PageA JSP that includes PageB
<html><body> This is page (A) that includes another page (B). <br> Doing the include now:<br> <jsp:include page="badTagInclude.jsp" /> <br>Back in page A after the include... </body></html>
PageB (the included file) JSP that invokes the bad tag
<%@ taglib prefix="myTags" uri="simpleTags" %> This is page B that invokes the tag that throws SkipPageException. Invoking the tag now:<br> <myTags:simple6/> <br>Still in page B after the tag invocation...
The tag handler doTag() method
public void doTag() throws JspException, IOException {
getJspContext().getOut().print("Message from within doTag().<br>");
getJspContext().getOut().print("About to throw a SkipPageException");
throw new SkipPageException();
}