I was wondering what exactly this java object is and what its main purpose is. I have looked java documentation, but that confuses me more :(.
Does it have any relation scopes such as session, request, application?
I was wondering what exactly this java object is and what its main purpose is. I have looked java documentation, but that confuses me more :(.
Does it have any relation scopes such as session, request, application?
The JspContext is confusing, because it doesn't seem to do anything that the ServletContext can't do. You're right, it doesn't. You can live without the JspContext. The implicit variables are there at your disposal.
The primary benefit lies in the fact that the JSP technology is not necessarily bound to Java. Yes. You heard that correctly, JSPs are positioned to be cross-platform compatible.
Quoting the API:
JspContext serves as the base class for the PageContext class and abstracts all information that is not specific to servlets. This allows for Simple Tag Extensions to be used outside of the context of a request/response Servlet.
This abstraction allows a JSP to gather information about its environment (request, session and application scope) in a platform-neutral manner.
JSP Context Object = Application context = ServletContext.
The scope is Application.
Hope this helps.
© 2022 - 2024 — McMap. All rights reserved.