File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

is scopes related to attributes only or for variables also?

 
yamini nadella
Ranch Hand
Posts: 257
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(1) Instance variable and local variables which are defined JSP declaration and scriptlets comes under which scope?
(2) is this scope concept related to only attributes or for variables also?
(3) parameters of URL comes in which scope?
 
Anthony Watson
Ranch Hand
Posts: 327
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) Instance variables are available anywhere on the page/translation unit. Local variables are available anywhere on the page after they have been declared. You could say that instance and local variables have page scope, but they will not be placed into the page context unless you explicitly put them there.

2) Both

3) Request scope
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic