Skip to content

Instantly share code, notes, and snippets.

Bill Burcham Bill

Block or report user

Report or block Bill

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@xkr47
xkr47 / StartTomcat.java
Last active May 13, 2019
Make Tomcat shut down automatically if any component fails to start up (written for tomcat version 7.0.47)
View StartTomcat.java
import static org.apache.catalina.Lifecycle.*;
import static org.apache.catalina.LifecycleState.*;
import org.apache.catalina.*;
import org.apache.catalina.connector.Connector;
import org.apache.catalina.startup.Tomcat;
// ...
tomcat.getServer().addLifecycleListener(new LifecycleListener() {
@Override
public void lifecycleEvent(final LifecycleEvent event) {
You can’t perform that action at this time.