scope and context.. ?

Hi...

Can any one clarify me whats the difference between a context and a scope ?

Ex. whats is difference between pageCOntext and pageScope ?

[160 byte] By [Shebua] at [2007-11-27 10:17:27]
# 1

From the API: A PageContext instance provides access to all the namespaces associated with a JSP page, provides access to several page attributes, as well as a layer above the implementation details.

http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/jsp/PageContext.html

With regards to Servlets/JSP, there are four "scopes" for storing attributes in: page, request, session and application. When talking about a scope normally refers to just ONE of those namespaces.

People sometimes do use pageContext and pageScope interchangeably because the method call pageContext.setAttribute() sets an attribute into the pageScope. But the pageContext is much more than that.

Hope I haven't confused you too much

Cheers,

evnafets

evnafetsa at 2007-7-28 15:51:48 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

thanks.. but...

What do you mean by namespaces associated with a JSP page and what are they ?

Shebua at 2007-7-28 15:51:48 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...