I'd like to have all of my JSP pages execute a certain chunk of Java code
before the page is displayed, and then execute another chunk of Java code
after the page is displayed.  I could use an "include" at the top and bottom
of each of my JSP pages, but this seems a little kludgy and error-prone.
Another way to do this might be to have all my JSPs extend a subclass of
HttpJspPage that I create.  However, I'm wary of doing this because Sun's
JSP documentation states that extending the JSP page "limits the JSP
container's ability to provide a specialized superclass that improves the
quality of the compiled file."

Does anyone have any experience with extending JSP pages through the use of
the "page extends" directive?  If so, what advice do you have for someone
thinking about doing it (e.g., gotchas, benefits)?

Alternatively, has anyone created a workaround for extending the JSP page
that accomplishes the same thing.

Thanks.

--
Stephen A. Williams
HNC Telecommunications Solutions

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to