An example of application object is presented below:

Java Code:
<%
 String theSharedObject = (String) application.getAttribute("message");
%>
<HTML>
<HEAD>
<TITLE>Application Object - Page 2</TITLE>
</HEAD>  <BODY>
    This page retrieves the message that was stored in the 
    <i>application</i> object  by another page.
  <P>
    The message is <b><%= theSharedObject %></b>
  </BODY>
</HTML>