<%@page contentType="text/html" import="java.util.*" %>
<!--
http://www.roseindia.net/jsp
-->
<html>
<body>
<p> </p>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing
="0" width="460" bgcolor="#EEFFCA">
<tr>
<td width="100%"><font size="6" color
="#008000"> Date Example</font></td>
</tr>
<tr>
<td width="100%"><b> Current Date
and time is: <font color="#FF0000">
<%= new java.util.Date() %>
</font></b></td>
</tr>
</table>
</center>
</div>
</body>
</html>
The heart of this example is Date() function of the java.util package which returns the current data and time.
In the JSP Declaratives
<%@page contentType="text/html" import="java.util.*" %>
we are importing the java.util package and following JSP Expression code
<%= new java.util.Date() %>
Popular Posts
-
Interfaces Interfaces allow us to create definitions for component interaction. They also provide another way of implementing polymorphism. ...
-
Data Types in VB .NET The Data types available in VB .NET, their size, type, description are summarized in the table below. Data Type Size i...
-
Methods A Method is a procedure built into the class. They are a series of statements that are executed when called. Methods allow us to han...
-
Creating DataTable Visual Basic allows us to create our own Tables and work with them. The DataTable is an in-memory representation of a blo...
-
JSP pages are high level extension of servlet and it enable the developers to embed java code in html pages. JSP files are finally compiled ...
-
The SQL AND clause is used when you want to specify more than one condition in your SQL WHERE clause, and at the same time you want all con...
-
Lab exercises and homeworks: * Things to check before you start the lab * Chapter 3 (Class #1, Jan. 16th homework) o Exerc...
-
<%@page contentType="text/html" import="java.util.*" %> <!-- http://www.roseindia.net/jsp --> ...
-
CONSTANTS,VARIABLES AND KEYWORDS: CONSTANTS: Two types of constants those are: a)primary constants b)secondary constants a)In primary consta...
-
Introduction: In this exercise, you will exercise the concept of pass by reference. Please not that primitive type parameters are passed ...
I certainly agree to some points that you have discussed on this post. I appreciate that you have shared some reliable tips on this review.
ReplyDeleteI certainly agree to some points that you have discussed on this post. I appreciate that you have
ReplyDeleteshared some reliable tips on this review.
Awesome work.Just wanted to drop a comment and say I am new to your blog and really like what I am reading.Thanks for the share
ReplyDelete