| Author |
Difference between jspInit and _jspInit
|
Swapnil Suryakant Prabhavalkar
Greenhorn
Joined: Feb 25, 2012
Posts: 23
|
|
Hi Ranchers,
What is the exact difference between jspinit and _jspInit?
I searched it on google and found the answers like :
1. After translating jsp into servlet, jspInit gets converted to _jspInit
2. _jspInit is only created when we use custom tags in JSP
But when I saw the source code of org.apache.jasper.runtime.HttpJspbase, there are calls to both jpInit and _jspInit from init method?
Could you please help me in understanding in this? thanks in advance.
|
Oracle Certified Professional, Java SE 6 Programmer (81%), Oracle Certified Expert, Java EE 6 Web Component Developer (87%)
|
 |
Roel De Nijs
Bartender
Joined: Jul 19, 2004
Posts: 4351
|
|
|
You can override jspInit-method and _jspInit-method (just like any other method starting with _) can't be overridden.
|
SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
|
 |
Swapnil Suryakant Prabhavalkar
Greenhorn
Joined: Feb 25, 2012
Posts: 23
|
|
Thanks Roel.
But I want to know what is the basic difference between them? Why those separate methods exist?
Cheers,
Swapnil
|
 |
Roel De Nijs
Bartender
Joined: Jul 19, 2004
Posts: 4351
|
|
|
Maybe this thread could help you
|
 |
 |
|
|
subject: Difference between jspInit and _jspInit
|
|
|