• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between jspInit and _jspInit

 
Swapnil Suryakant Prabhavalkar
Greenhorn
Posts: 23
Eclipse IDE Firefox Browser Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Roel De Nijs
Sheriff
Posts: 10591
140
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can override jspInit-method and _jspInit-method (just like any other method starting with _) can't be overridden.
 
Swapnil Suryakant Prabhavalkar
Greenhorn
Posts: 23
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Roel.

But I want to know what is the basic difference between them? Why those separate methods exist?

Cheers,
Swapnil
 
Roel De Nijs
Sheriff
Posts: 10591
140
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe this thread could help you
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic