by Dinesh Thakur Category: Session

This example will explain that the HttpServletResponse setDateHeader() method is used to set date with header the example we use util package that will allow us to access the mandatory library for date initializing on the web browser as output.

<%@ page import="java.util.*" %>



     <title>&lt;dateHeader&gt;In Jsp</title>





       long dt = new Date().getTime();

       response.setDateHeader("Date", dt);

       out.println("Date is : "+response.getHeader("Date"));




         Jsp setDateHeader Example

About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.C.A, MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.