0
4.0kviews
Write a JSP program to display todays date

Mumbai University > Information Technology > Sem 4 > Web Programming

Marks: 5M

Year: May 2014

1 Answer
0
67views
<% @ page import = “java.io.*”, java.util.*, java.servlet.*” %>
<html>
<head>
<title> Display Current Date and Time </title>
</head>
<body>
<center>
<h1> Display Current Date and Time </h1>
</center>
<% 
   Date date = new Date();
   out.print( “ <h2 align=\”center\”>” +date.toString()+”</h2>”);
%>
</body>

</html>

Output:

Display Current Date and Time

Mon Jun 21 21:46:49 GMT+04:00 2010

Please log in to add an answer.