• Post Reply Bookmark Topic Watch Topic
  • New Topic

Implicit object in jsp declared where?  RSS feed

 
Mahendra Athneria
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have one question regarding implicit objects in jsp. we can use implicit object in jsp scriptlet without declaring them. it means they are declared somewhere. i wanted to know that in which class/interface these variable declared. one more question, why we are not able to access those variables in declaration part of jsp.

Regards,
Mahendra Athneria
Mumbai - India
 
Ravi Challapalli
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the servlet compiled out of the JSP page.
You will see these variables are declared inside the _jspService(container specific name) method which is generated by the jspc.
The jspc will generate the create/initialization code for these variables.

These variables are created inside the _jspService(container specific name) and local to this method. Where as the JSP declaration part goes out of this method, so these variables are not accessible.

Looking at a generated servlet would give you more detialed info.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!