<%@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
-
Files in VB .NET Working with Directories We will work with the File and Directory classes in this section. We will create a directory and c...
-
package interfaceexercise; // Define an interface with three abstract methods. // Any class that implements this interface has to // impleme...
-
Setting Properties At Run-Time By now you know how to set a component property before running your program (=at "Design Time"), No...
-
Data Access using MSAccess To work with Microsoft Access we use the OleDb data Provider. Sample Code Create a database named Emp in Microsof...
-
Introduction: In this exercise, you are going to build and run a sample Java program called CommandLineusing NetBeans. The sample program c...
-
Tutorials Chapter 1 : What is SQL Server? Chapter 2 : Compare SQL Server and MS Access Chapter 3 : What is MSDE ? Chapter 4 : SQL Server Edi...
-
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 SELECT INTO statement is used to select data from a SQL database table and to insert it to a different table at the same time. The g...
-
Now I will show you how to retrieve the data posted from a HTML file in a JSP page. Consider an html page that prompts the user to enter his...
-
To simplify code in JSP expressions and scriptlets, you are supplied with eight automatically defined variables, sometimes called implicit o...
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