There are 9 JSP implicit objects. These objects are generated by the web container that is present on all the JSP pages.
The present implicit components are out request, config, session, application, etc.
Below is the list of 9 implicit objects:
Object | Type |
out | JspWriter |
request | HttpServletRequest |
response | HttpServletResponse |
config | ServletConfig |
application | ServletContext |
session | HttpSession |
pageContext | PageContext |
page | Object |
exception | Throwable |
For writing down any data to the buffer, JSP gives an implicit object named out. It is the component of JspWriter. You need to write the below-given statement in case of a servlet:
PrintWriter out=response.getWriter();
But the same is not applicable in the case of JSP, you need to write the below-given code in JSP
We are showing the simple date and time in the below given example:
index.jsp
<html> <body> <% out.print("Today is:"+java.util.Calendar.getInstance().getTime()); %> </body> </html>
Output