This section illustrates you how client gets auto refresh.
We are providing you an example which explains you clearly. In the example, We have created the session by request.getSession() method. The method response.addHeader("Refresh", "15") refreshes the servlet after every 15 seconds till the servlet gets destroy.
Here is the code of ClientAutoServlet.java
In web.xml, do the servlet-mapping
Output will be displayed as:
After 15 seconds, page will get refresh. Output will be:
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.