aspose file tools*
The moose likes JSP and the fly likes Declaration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Declaration" Watch "Declaration" New topic
Author

Declaration

Mathew Sam
Ranch Hand

Joined: Dec 19, 2001
Posts: 124
what is the difference between variables declared using scriplets tag and using declaration tag.
1)<% String s; %>
2)<! String s %>
Arun Boraiah
Ranch Hand

Joined: Nov 28, 2001
Posts: 233
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


Sharing is learning
Mathew Sam
Ranch Hand

Joined: Dec 19, 2001
Posts: 124
Thanks for the info
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Declaration