gmhk
gmhk

Reputation: 15960

Why can't jspService() be overridden?

Why can't the jspService() method be overridden, where as jspInit() and jspDestroy() can be overridden?

Upvotes: 6

Views: 5363

Answers (1)

Stephen C
Stephen C

Reputation: 719249

This forum post explains why you cannot override jspService().

Basically, if you tried to override the jspService method, the code generated by the JSP compiler would end up with two copies of the method: the one you wrote and the one created by the compiler. This would result in a Java compilation error.

Upvotes: 8

Related Questions