Master java skills

out Implicit Object

out is used to print something on the browser. This is object of JspWriter class. Below is an example

Note -> In Servlet, we have to create an object of JspWriter class explicitly to print something on the browser. Here in jsp, it is implicitly provided.

Here, we are printing current system date within a scriptlet tag using imlicit object out.

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
	<% out.print("Today is: " + java.util.Calendar.getInstance().getTime()); %>
</body>
</html>