The "PageContext API" is the general term used to describe all classes relating to
JSP contexts - this terminology is for historial reasons, as JspContext was added in JSP 2.0, but PageContext has been around for much longer... The API includes both PageContext and JspContext - and therefore I suppose we could say that JspContext lies at its heart.
It's worth mentioning that in practice, nearly every JspContext instance is in fact a PageContext. The former is designed to be portable across platforms which support JSP but don't necessarily use
servlets, while PageContext is designed specifically for servlet environments. Since nearly all JSP servers are J2EE-based, and therefore are built on the servlet model, it is
nearly always the case that JspContext == PageContext.
It can actually be very useful to use PageContext directly, as PageContext contains all the constants for the different scopes (e.g. REQUEST_SCOPE), which can be used in JspContext to extract variables from specific scopes (as opposed to a global search using findAttribute()). So it can be useful to have a PageContext occasionally; when this is the case, doing a cast on getJspContext() usually does the job - but you may want to verify (using the instanceof
test) that the JspContext is indeed a PageContext first, just to avoid any potential exceptions!
Hope that helps.