<!--File jsp006.jsp
02/14/00
Illustrates the JSP Page Directive.
Access http://localhost:8080/jsp006.jsp to run
this JSP file in the Sun jswdk-1.0.1 reference
implementation of jsp.
-->
<%-- Some page directives for the
import attribute --%>
<%@ page import="java.util.Date" %>
<%@ page import="java.awt.*" %>
<%-- A page directives for the
info attribute --%>
<%@ page info="Info about the page" %>
<html>
<body>
The date and time produced by a
Date object using the import
page directive to provide the
path to the Date class:<BR>
<B><%= new Date() %></B>
<BR><BR>
The default String representation
of a Button object produced by
using the wildcard version of the
import page directive to provide
the path to the Button class:<BR>
<B><%= new Button("The Label") %></B>
<BR><BR>
Information about the page
provided by the info attribute of
a page directive and accessed using
the <B>getServletInfo()</B> method of
the Servlet class.<BR>
<B><%= this.getServletInfo()%></B>
</body>
</html>
Figure 1
|