Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Did implicit objects are instance variables or local variables in _jspService

 
somjet thana
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Did implicit objects are instance variables in servlet class or local variables in _jspService()

thanks
somjet
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They are local to your service method.
 
Chethan C Gowda
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out page number 295 in HFSJ.
 
Harini Venkatraman
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Implicit objects are local variables, not comes under instance variables.
i.e., local variables in _jspService() method.

For better understanding try the following example: I practiced it in a mock...

<%! java.util.Locale class1=request.getLocale(); %>

It won't even compile.

The eight implicit objects in jsp pages are not visible in declarations. Declaration part( <%!...%> )doesn't goes to service() method na..
Implicit objects are visible in scriplets and expressions only.

Thank U

-------
Harini

SCJP 1.4
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic