aspose file tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes JSP Base class Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "JSP Base class" Watch "JSP Base class" New topic
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
    
  11

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
    
  11

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
 
Similar Threads
what is the different between doClick and OnClick methods
comparing 2 date objects...very urgent
double value
Calculate Date having DIFFERENT DATE FORMATS
Can a FrontMan class access the argument to @FrontmanCommand value