Solution:
1. The file required to run the application is Date.jsp. The file is to be saved in C:\Tomcat 5.5\Webapps\basic directory.
//Date.jsp
<html>
<head>
<title>Example of JSP Implicit Object</title>
<%@ page import="java.util.Date" %>
</head>
<body bgcolor=#ffffff>
<font color="Black">
<h2> This example gives the Current Date </h2>
<h3>
<% response.setHeader("Refresh", "6"); %>
Current date: <%= new Date() %>.
</h3>
</body>
</html>
The output of the program is as shown in Figure 4.4.
0 nhận xét:
Post a Comment