Examples / Server Examples / JSP Date

JSP Date

example java server jsp

This example uses JSP to show today’s date:

<%@ page import="java.util.Date" %>
<!DOCTYPE html>
<html>
  <head>
    <title>JSP Date</title>
  </head>
  <body>
    <h1>JSP Date</h1>
    <p>The current date is: <%= new Date() %></p>
  </body>
</html>

date webpage


Comments and Questions

Happy Coding is a community of folks just like you learning about coding.
Do you have a comment or question? Post it here!