Implicit Object_2
1. application implicit
- application is an implicit object of type ServletContext
- The instance of ServletContext is created only one by the web container when application or project is deployed on the server
- This object can be used to get initialization parameter from configuration file(web.xml)
1_1 index.html
1_2. web.xml
1_3. welcome.jsp
2. session implicit
- The Java developer can use this object to set, get or remove attriute or to get session info
2_1. index.html
2_2. welcome.jsp
2_3. second.jsp
3. pageContext implicit
- The pageContext object can be used to set, get or remove attribute from one of the following scopes
- page
- request
- session
- application
3_1. index.html
3_2. welcome.jsp
3_3. second.jsp
4. page implicit
- This object is assigned to the reference of auto generated servlet class
Object page = this;
4_1. Example
<% (HttpServlet)page.log("message"); %>
- You can use this object directly in jsp
<% this.log("message"); %>
5. exception implicit
- This object can be used to print the exception. But it can only be used in error pages.
5_1. error.jsp
'Back-End > Jsp' 카테고리의 다른 글
[Jsp] Include & taglib directive (0) | 2016.07.07 |
---|---|
[Jsp] Page directives (0) | 2016.07.06 |
[Jsp] Implicit Objects_1 (0) | 2016.07.05 |
[Jsp] JSP tags (0) | 2016.07.05 |
[Jsp] JSP API (0) | 2016.07.05 |