• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SkipPageException doubt

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
this is the correct behavior
which page throw exception "check.jsp"
refer HFSJ 1.4 page 514

Sravanthi
 
reply
    Bookmark Topic Watch Topic
  • New Topic