• Post Reply Bookmark Topic Watch Topic
  • New Topic

Visibility of Implicit Objects

 
Sujai Kaarthik
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are the implicit objects like request, response and out are visible in jspService(), _jspService(), jspInit(), jspDestroy()?
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
container generated servlet code from a jsp


all the implicit objects are a local variable to _jspService . so obviously it is not available outside of service. only you can use in <% (scriplet) %> and <%= (expression) %>[scriptlets are not considered as good practice]

as a side note: prefix _ of service(_jspService)indicate that you cant override service method of jsp

hth
 
Sujai Kaarthik
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Seetharaman..

one more doubt,

do ResultSet, Connection, Statement and PreparedStatement have getMetaData method?
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sujai Kaarthik wrote:Thank you Seetharaman..

you are welcome
Sujai Kaarthik wrote:do ResultSet, Connection, Statement and PreparedStatement have getMetaData method?


what the API is saying ?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sujai Kaarthik wrote:Are the implicit objects like request, response and out are visible in jspService(), _jspService(), jspInit(), jspDestroy()?

Just out of curiosity, why do you want to know this? Is this for an interview question? Because I'd really hope you're not doing anything with those methods yourself.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!