1. JSP container provides a list of objects for you to access different kind of data in a web application. Those objects are called implicit object because it is automatically available to access.
2. These implicit objects are Java objects that implement interfaces in the Servlet and JSP API.
There are nine (9) JSP implicit objects available.
Object | Class |
1. request | javax.servlet.ServletRequest |
2. response | javax.servlet.ServletResponse |
3. application | javax.servlet.ServletContext |
4. session | javax.servlet.http.HttpSession |
5. page | java.lang.Object |
6. config | javax.servlet.ServletConfig |
7. exception | java.lang.Throwable |
8. pageContext | javax.servlet.jsp.PageContext |
9. out | javax.servlet.jsp.JspWriter |
Note : out & pageContext implicit objects are specially designed for Jsp’s
Implicit objects summary :
1. Except session and exception implicit objects all are by default available to every Jsp.
2. We can’t make them unavailable.
3. But session objects are always available to every Jsp. But we can make it unavailable by using session attribute of page directive.
<%@ page session = “false” %>
4. Exception implicit object is not available by default but we can make it available by using isErrorPage of the page directive.
<%@ page isErrorPage = “true” %>
5. Among all 9 Jsp implicit objects the most powerful object is pageContext.
The most rarely used implicit object is page.
No comments:
Post a Comment