Categories:
.NET (961)
C (387)
C++ (185)
CSS (84)
DBA (8)
General (31)
HTML (48)
Java (641)
JavaScript (220)
JSP (109)
JUnit (31)
MySQL (297)
Networking (10)
Oracle (562)
Perl (48)
Perl (9)
PHP (259)
PL/SQL (140)
RSS (51)
Software QA (28)
SQL Server (5)
Struts (20)
Unix (2)
Windows (3)
XHTML (199)
XML (59)
Other Resources:
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?
✍: FYICENTER.com
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, 5177👍, 0💬
Popular Posts:
What Happens If a Hyper Link Points to a Music File? - XHTML 1.0 Tutorials - Understanding Hyper Lin...
What is the result of using Option Explicit? When writing your C program, you can include files in t...
What Is a CAPTION Tag/Element? - XHTML 1.0 Tutorials - Understanding Tables and Table Cells A "capti...
What is the output of printf("%d")? 1. When we write printf("%d",x); this means compiler will print ...
What is the difference between Authentication and authorization? This can be a tricky question. Thes...