All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.baloise.maven.solr.ShutDownServlet Maven / Gradle / Ivy

There is a newer version: 1.0.4
Show newest version
package com.baloise.maven.solr;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class ShutDownServlet extends HttpServlet {
  @Override
  protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
    ServletOutputStream outputStream = resp.getOutputStream();
    outputStream.print("Shutting down");
    outputStream.flush();
    System.exit(0);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy