%-----------------------------------------------------------
Copyright © 1999, Oracle Corporation. All rights reserved.
------------------------------------------------------------%>
<%-- declare request and page scoped beans here --%>
<%-- declare the event dispatchers --%>
<%!
// request_OnEnd Event Handler
public void request_OnEnd(ServletContext application, HttpServletRequest request) {
// acquire beans
oracle.jsp.jml.JmlNumber includeCount =
(oracle.jsp.jml.JmlNumber) request.getAttribute("includeCount");
// now cleanup the bean
if (includeCount != null) application.log("request_OnEnd: Include count = " + includeCount.getValue());
}
// page_OnEnd Event Handler
public void page_OnEnd(ServletContext application, PageContext page) {
// acquire beans
oracle.jsp.jml.JmlNumber pageCount =
(oracle.jsp.jml.JmlNumber) page.getAttribute("pageCount");
// now cleanup the bean -- uncomment code for real bean
if (pageCount != null) application.log("page_OnEnd: Page count = " + pageCount.getValue());
}
%>
<%-- Page implementation goes here --%>
Hello World
Included: <%= request.getAttribute("javax.servlet.include.request_uri") %> Count: <%= includeCount.getValue() %>
<% if (includeCount.getValue() < 5) { %>
<% } %>