Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Shutting down jetty using ShutdownHandler

I am using as a guide to try to shut down my jetty server, but I'm getting " Unexpected end of file from server" when "connection.getResponseCode();" is called and I don't know why. I'm using an xml configured server, so the way that the ShutdownHandler is added to the Handler chain is a little different, but it should be fine. I know that the ShutdownHandler is properly wired up to the handler chain because I used dumpAfterStartup to check if it was started.

The thing that I am most unsure of is the line: URL url = "" URL("http://localhost:" + port + "/shutdown?token=" + shutdownCookie);. I don't know what I'm supposed to put in the shutdownCookie field; the password specified in the ShutdownHandler, or the STOP key, or what. I've tried both the password and the STOP key with no luck. I'm using POST as my request method, but I tried PUT as well and it does not work either.

Back to the top