ConradK
ConradK

Reputation: 11

Health Check url misconfigured AWS

I am trying to deploy my java servlet to elastic beanstalk and it is always failing on the health check URL. I have a health checker servlet whose code is the following

public class HealthCheck extends HttpServlet { private static final long serialVersionUID = 1L;

public HealthCheck() {
    super();
    // TODO Auto-generated constructor stub
}


protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {


    response.setStatus(HttpServletResponse.SC_OK);


}

I thought this would work, but i guess not. I am using ecplise EE and using the web.xml that it auto generates and the url-path being /HealthCheck. Anyone know why this is not working for me? Thanks!

Upvotes: 0

Views: 433

Answers (1)

whdinata
whdinata

Reputation: 61

You should try these:

  1. Create a html file in WebContent folder. You can just create an empty html, it's enough.
  2. Rebuild your project with Java 6 because AWS Beanstalk uses Java 6.

Upvotes: 1

Related Questions