aspose file tools*
The moose likes JSP and the fly likes scopes in the jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "scopes in the jsp" Watch "scopes in the jsp" New topic
Author

scopes in the jsp

ajay verma
Ranch Hand

Joined: Dec 10, 2007
Posts: 37
i know the 4 scopes: page,request,session,application
but what is the usage of scope in jsp?
in every technologies and frame works some scopes are defined .but how they works?
pls explain it!

thank you
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

The scope of a variable determines how long it will last and who can access it. Binding a variable to context scope will cause it to last the lifetime of the application and make it available to everyone. Binding it to session will make it available only to the user who owns the session and only for the length of that session. Request scope keeps a variable alive for one request/response cycle and allows it to be accessed by different components within that cycle. Page scoped values are gone as soon as context is moved to another resource.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
ajay verma
Ranch Hand

Joined: Dec 10, 2007
Posts: 37
thanks Ben Souther
thanks a lot
i am sure that you can answer my next question also

thanks again
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: scopes in the jsp
 
Similar Threads
scopes
PageContext and servletContext
Servlet
JSP implicit Object HttpServletRequest or ServletRequest ?
using jsp:useBean tag