• Post Reply Bookmark Topic Watch Topic
  • New Topic

implicit variables accessibility

 
vijay kumarg
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What implicit variables can be accessed in a jsp declaration tag?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65519
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by a "jsp declaration tag"?
[ February 11, 2007: Message edited by: Bear Bibeault ]
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look at this URL

http://www.roseindia.net/jsp/jspfundamentals.shtml

It lists down some implicit variables that can be used in a JSP page. You should have a look at the JSP specs for better detail
 
Rick Rangers
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I think that you cannot access any implicit objects in JSP delcarations. JSP declarations become instance variables or instance methods the compiled JSP.

The implicit objects are defined in the _jspService method of this servlet and are local to this method and are hence not accessible by the other methods.

HTH
Rick
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65519
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If by "declaration tag" you mean a declaration scriptlet (not a tag), then Rick is correct. No implicit variables are defined.

You should be very careful when using declartion scriplets. They are the easiest way to introduce threading issues into your pages.
 
vijay kumarg
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Rick, Bear.
Yes, I should mention as scriptlet insteadof tag
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!