| Author |
JSP Base class
|
Joe Harry
Ranch Hand
Joined: Sep 26, 2006
Posts: 8795
|
|
|
Is it true that in the HttpJspBase abstract class the methods init() service() and destry() are marked final and that it is from these respective methods, the corresponding jspInit() _jspService() and jspDestroy() are called??
|
SCJP 1.4, SCWCD 1.4 - Hints for you, SCBCD Hints - Demnachst, SCDJWS - Auch Demnachst
Did a rm -R / to find out that I lost my entire Linux installation!
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
|
|
I think that HttpJspBase is an Apache implementation, so you should not have to care about what it does. You can check the API on the net, for example : http://www.jdocs.com/jasper/5.0.27/api/org/apache/jasper/runtime/HttpJspBase.html#init(javax.servlet.ServletConfig)
|
[My Blog]
All roads lead to JavaRanch
|
 |
Joe Harry
Ranch Hand
Joined: Sep 26, 2006
Posts: 8795
|
|
|
I asked this because there was a question like what prevents us from overriding init(), service() and destroy(). So the reason that I found out was, they are declared final. Not only this but I guess it should be the standard for a web container. Am I right Satou??
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
|
|
So the reason that I found out was, they are declared final. Not only this but I guess it should be the standard for a web container
The container provider decided to make them final because you should not implement them. As I explained in a previous thread, those are crucial servlets life cycle methods, which you should not deal with in JSP files. The same methods, called jspXXX were made for this purpose. So the way of thinking is not "methods are final so I can't override", but "I will use jspInit, _jspService and jspDestroy because that's the only thing I have".
|
 |
 |
|
|
subject: JSP Base class
|
|
|