I have created a health check web page for our applications. I want his page to be refreshed every 3 minutes. I have seen the code necessary to do this via the servlet or jsp. My question is for these to constantly work do they need to be on the page. When I close the page it doesnt seem to refresh anymore. What other options do I have. This is written in Java using Intellij.The code just pings the URL and see if a 200 is returned. Any help would be appreciated.
Asked
Active
Viewed 403 times
0
-
I have tried Meta and response.addHeader("Refresh", "5"); – Jeff Hatlestad Jan 27 '21 at 18:27
-
How about use Servlet page request and response? For example, you can write your Servlet page called 'ping' mapped by '/ping, HTTPMethod.GET'. when you call '/ping' then your WAS would catch HTTP request by url '/ping' and will redirect your Servlet page. In your Servlet page, write something response code and return to caller. – Han Jan 28 '21 at 05:36
-
reference : https://stackoverflow.com/questions/2010990/how-do-you-return-a-json-object-from-a-java-servlet – Han Jan 28 '21 at 05:40