Apr
30

How to declare JSP

By admin  //  JAVA  //  View Comments
<%@ page import="java.util.*" %>
<HTML>
<BODY>
<%!
    Date theDate = new Date();
    Date getDate()
    {
        System.out.println( "In getDate() method" );
        return theDate;
    }
%>
Hello!  The time is now <%= getDate() %>
</BODY>
</HTML>

Related posts:

  1. Using Scriptlets in JSP
  2. Displaying current time in JSP
  3. Inheritance in JAVA
  4. Inserting records in SQL Database using JAVA Applets
  5. What Is a Package in JAVA?
blog comments powered by Disqus