0
3.8kviews
Write a JSP program to display todays date
written 6.9 years ago by | • modified 6.9 years ago |
Mumbai University > Information Technology > Sem 4 > Web Programming
Marks: 5M
Year: May 2014
ADD COMMENT
EDIT
1 Answer
written 6.9 years ago by | • modified 6.9 years ago |
Mumbai University > Information Technology > Sem 4 > Web Programming
Marks: 5M
Year: May 2014
written 6.9 years ago by |
<% @ 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