@@ -0,0 +1,1156 @@
+package com.ibm.cloudoe.samples;%0A%0Aimport java.io.IOException;%0Aimport javax.servlet.ServletException;%0Aimport javax.servlet.annotation.WebServlet;%0Aimport javax.servlet.http.HttpServlet;%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.servlet.http.HttpServletResponse;%0A%0A/**%0A * Servlet implementation class KillInstanceServlet%0A */%0A@WebServlet(description = %22Kill the CF application instance%22, urlPatterns = %7B %22/KillInstanceServlet%22 %7D)%0Apublic class KillInstanceServlet extends HttpServlet %7B%0A%09private static final long serialVersionUID = 1L;%0A%0A    /**%0A     * Default constructor. %0A     */%0A    public KillInstanceServlet() %7B%0A        // TODO Auto-generated constructor stub%0A    %7D%0A%0A%09/**%0A%09 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)%0A%09 * %0A%09 * Return Cloud Foundry application instnace index number as JSON%0A%09 */%0A%09protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException %7B%0A%09%09Runtime.getRuntime().halt(-1);%0A%09%09%0A%09%09response.setContentType(%22application/json%22);%0A%09%09response.getWriter().append(%22%7B'instanceIndex' : %22 + System.getenv(%22CF_INSTANCE_INDEX%22) + %22 %7D%22);%0A%09%7D%0A%0A%7D%0A

add KillInstanceServlet to close #2