Hello Devs,

In this tutorial, we are going to learn about JSP Application implicit object. In JSP, Application implicit object used for getting initialization parameters and for sharing the attributes and their values across all JSP page.

Application implicit object Example


<%@ page import="java.io.*,java.util.*" %> <!DOCTYPE html>
<title> Application Implicit Object</title>
<h1>JSP Tutorial</h1> <%
Integer counter= (Integer)application.getAttribute("visit");
if( counter ==null || counter == 0 ){
counter = 1;
counter = counter+ 1;
application.setAttribute("visit", counter);
<h3>Total number of view to this Page is: <%= counter%></h3>
<p>Copyright © 2017 By <a href="//www.studentstutorial.com" target="_blank" style="text-decoration:none"><b style="color:green">studentstutorial.com</b></a>. All Rights Reserved.</p>

I hope this example helps you.