public class HstPingServlet
extends javax.servlet.http.HttpServlet
A servlet that can be used to check if the repository is up-and-running. This is especially useful for load balancer checks. The check does the following steps:
On success the servlet prints "Ok" and returns a 200 status, on failure, the error is printed and a 500 (internal server error) status is returned.
In case the custom message is provided, a service unavailable error (503) is returned
To enable the servlet add the following to your web.xml
HstPingServlet
org.hippoecm.repository.HstPingServlet
check-pool
default
check-node
content/documents
HstPingServlet
/ping/*
]]>
Constructor and Description |
---|
HstPingServlet() |
Modifier and Type | Method and Description |
---|---|
protected void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res) |
void |
init(javax.servlet.ServletConfig config) |
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
init
in interface javax.servlet.Servlet
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
protected void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, IOException
doGet
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
Copyright © 2008–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.