How to display date in JSP?

How to display date in JSP?

How to create a simple JSP program which displays date on the page?

Thanks

View Answers

May 10, 2017 at 11:27 PM

Hi,

You should import the java.util package:

<%@page contentType="text/html" import="java.util.*" %>

Then use the following code to print the current date:

<%= new java.util.Date() %>

Check complete tutorial at How to Create JSP Page?

Thanks

Ads









Related Tutorials/Questions & Answers:
How to display date in JSP?
How to display date in JSP?
Advertisements
How to display current date in textbox - Date Calendar
JSP1
JSP2
how to display(update) current date and month in select box on selecting the year.
how to create own tld and use it in jspx file
how to create own tld and use it in jspx file
ModuleNotFoundError: No module named 'jspp'
ModuleNotFoundError: No module named 'JSPy'
Only Display Date
SQL display date in between query
how can i display the dates of one week by selecting the date randomly from the calendar?
how to write jsps and databasetables,umldiagrams in fuelmanagement system project
display date to jsp from database
how to display?
how to display?
how to display?
Display Date and Time - Design concepts & design patterns
how to display?
Display PHP clock with user input date and time
How to display the current time
how to display image with listview
How to compare date in Java?
How to use Date Picker iPhone
How to Convert String to Date?
PHP Display date and time
how to add date and change date in java - netbeans
How to display string or character
HOW TO DISPLAY TABLEEEE
Mysql Date Format codes

Ads