Overriding JSP Server Generated Servlet Subclass
How do I have the JSP-generated servlet subclass be my own custom servlet class, instead of the default?
One should be very careful when having JSP pages extend custom servlet classes as opposed to the default one generated by the JSP engine. In doing so, you may lose out on any advanced optimization that may be provided by the JSPengine.
In any case, your new superclass has to fulfill the contract with the JSP engine by: Implementing the HttpJspPage interface, if the protocol used is HTTP, or implementing JspPage otherwise Ensuring that all the methods in the Servlet interface are declared final.
Additionally, your servlet superclass also needs to do the following:
If any of the above conditions are not satisfied, the JSP engine may throw a translation error.
2007-04-03, 4870👍, 0💬
Managed Code and Unmanaged Code related ASP.NET - How do you hide Public .NET Classes and other publ...
What is DAR (Decision Analysis and Resolution) ? Decision Analysis and Resolution is to analyze poss...
What is thread? A thread is an independent path of execution in a system.
What are the core functionalities in XML .NET framework? Can you explain in detail those functionali...
How do we host a WCF service in IIS? Note: - The best to know how to host a WCF in IIS is by doing a...