Re: [jetty-users] ServletContextListener defers server start

2019-10-07 Thread Dirk Olmes
On 10/7/19 4:35 PM, Bill Ross wrote: > Would anything like these chunks from my code work for you? The secret > is checking status in doGet(). Thanks, a lot Bill. This looks quite similar to the solution I currently have in place. However, our app consists of more than one servlet and I had to

Re: [jetty-users] curl: (56) Unexpected EOF

2019-10-07 Thread Glen Peterson
Oh. I found the other file in org.eclipse.jetty:jetty-http:9.4.21.v20190926 that has the other line in it. I included the ServicesResourceTransformer (thank you Steven!) and it merged the two files for me. Perfect! Sounds like that was the root cause of my issue. I searched again, to see how

Re: [jetty-users] curl: (56) Unexpected EOF

2019-10-07 Thread Greg Wilkins
Glen, not it's not just the META-INF/services/org.eclipse.jetty.http.HttpFieldPreEncoder file I'm concerned with, but any META-INF/services/* file, with examples including: - com.sun.net.httpserver.spi.HttpServerProvider - javax.servlet.ServletContainerInitializer -

Re: [jetty-users] curl: (56) Unexpected EOF

2019-10-07 Thread Steven Schlansker
> On Oct 7, 2019, at 12:33 PM, Glen Peterson wrote: > ... > I'm using the Maven Shade plugin. What would you recommend as a better tool > to make a fat jar? I tried Gradle too, but went back to Maven specifically > because the Shade plugin had better debugging info than the Gradle Shadow >

Re: [jetty-users] curl: (56) Unexpected EOF

2019-10-07 Thread Glen Peterson
I only found the META-INF/services/org.eclipse.jetty.http.HttpFieldPreEncoder file in the org.eclipse.jetty.http2:http2-hpac:9.4.20.v20190813 jar file and it had just the one line in it: org.eclipse.jetty.http2.hpack.HpackFieldPreEncoder Same thing with version 9.4.21.v20190926. Should I be

Re: [jetty-users] ServletContextListener defers server start

2019-10-07 Thread Joakim Erdfelt
I went ahead and added an example to the Embedded Jetty Cookbook. https://github.com/jetty-project/embedded-jetty-cookbook/blob/master/src/main/java/org/eclipse/jetty/cookbook/DelayedWebAppDeployExample.java That explains how to accomplish what you need. Joakim Erdfelt / joa...@webtide.com On

Re: [jetty-users] ServletContextListener defers server start

2019-10-07 Thread Bill Ross
(and return after the 503) On 10/7/19 7:35 AM, Bill Ross wrote: Would anything like these chunks from my code work for you? The secret is checking status in doGet(). public class GetMult extends HttpServlet {     private ServletData servletData;     public void init(ServletConfig config)

Re: [jetty-users] ServletContextListener defers server start

2019-10-07 Thread Bill Ross
Would anything like these chunks from my code work for you? The secret is checking status in doGet(). public class GetMult extends HttpServlet {     private ServletData servletData;     public void init(ServletConfig config) throws ServletException {     servletData = ServletData.get();

Re: [jetty-users] ServletContextListener defers server start

2019-10-07 Thread Dirk Olmes
On 10/7/19 11:21 AM, Bill Ross wrote: > Why not have a ContextHandler that starts a setup thread on init, and > answers 503 until that thread is done? That's sort of what I currently do (starting a setup thread from the main servlet's init method) but that causes all kinds of trouble because the

Re: [jetty-users] ServletContextListener defers server start

2019-10-07 Thread Bill Ross
Why not have a ContextHandler that starts a setup thread on init, and answers 503 until that thread is done? Bill On 10/7/19 2:10 AM, Dirk Olmes wrote: On 10/5/19 2:07 AM, Greg Wilkins wrote: Dirk, Hi Greg, Note that you can actually achieve this with just a little bit of work: Write a

Re: [jetty-users] ServletContextListener defers server start

2019-10-07 Thread Dirk Olmes
On 10/5/19 2:07 AM, Greg Wilkins wrote: > Dirk, Hi Greg, > Note that you can actually achieve this with just a little bit of work: > > Write a simple context (extend context handler) that all it does is send a > 503 with whatever message you want. > Deploy both that context and your context at