Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Declaration

 
Mathew Sam
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the difference between variables declared using scriplets tag and using declaration tag.
1)<% String s; %>
2)<! String s %>
 
Arun Boraiah
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
<% declaration %> (scriplet tag) the variable declared will be local to method(say service or user defined method).
<%! code %>(Declaration tag) code is inserted inbody servlet class, outside of service method. There by avaliable for all mehtod's of that jsp.
-arun
 
Mathew Sam
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the info
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic