How to see the current date in jsp.?

firstly open the eclipse IDE  and  create new project .

name that project and click finish.

goto web  content and create a new file  name helloword.jsp.

and click ok.

and now create and write the code.

<html>

<body>

<h3>hello word</h3>

the time on the server is

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

//create new date object

//output indulged in html page

</body>

</html>

output:

hello world of java

the time on the server is monday 10:25 am 2020.

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *