• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SkipPageException doubt

 
Prem Kashyap
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a parent.jsp file with the following contents :

<html>

<body>

This is my parent JSP page. <br>
<jsp:include page="Check.jsp" /> <br>
After including the file whose tag threw exception
</body>
</html>

Check.jsp:

<%@ page errorPage="errorPage.jsp" import="java.util.*,com.TestBean" pageEncoding="UTF-8" session="true" %>
<%@ taglib prefix="myTags" uri="simpleTags" %>


<body>
This is child JSP <br>
<myTags:simple/>

Back in the page after exception is thrown. This will not print.
<br>
</body>
</html>

Tag Handler Class :

public class SimpleTagTest1 extends SimpleTagSupport {
this.getJspContext().getOut().print("Going to throw exception");
throw new SkipPageException();

}

As you can see the <body-content> of the tag handler is empty which is defined in the tld.

SO when i run the parent.jsp, i get the expected output:
This is my parent JSP page
This is child JSP
Going to throw exception
After including the file whose tag threw exception


My question is if the <body-content> is not empty. It is scriptless, then the body of the tag is printing after the following line :

After including the file whose tag threw exception

So let me know if this is the correct behavior?

Regards

Prem Kashyap
 
S Sravs
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is the correct behavior
which page throw exception "check.jsp"
refer HFSJ 1.4 page 514

Sravanthi
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic