Setting a JSP to Final
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Steven_Martin
Posted On:   Tuesday, December 10, 2002 10:04 AM

Is there a way to assign the final modifer to a JSP class? With a servlet we can do that and get some of the performance benefit. I searched Java's site but couldn't find any documentation.



thanks,

Steven

Re: Setting a JSP to Final

Posted By:   Govind_Seshadri  
Posted On:   Sunday, December 15, 2002 10:58 PM

This would typically depend upon the vendor implementing your servlet container. If you are using Tomcat, you should be able to download the source and easily have the Catalina container tag the generated servlet source for a JSP as final.

A vendor-independent way of doing this would be to have your JSP extend your own base class by making use of the extends attribute of the page directive. Of course, your base class would have to now fully implement the Servlet interface too...not exactly a easy task. Take a look at the JSP spec for details on this if you are interested.
About | Sitemap | Contact