Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] embedded welcomefiles+http2-push+gzip-static-content+rest-api configuration


at id.kbr.prime.JettyJavaStarter.main(JettyJavaStarter.java:111)
Suppressed: java.lang.NullPointerException
at org.eclipse.jetty.servlets.PushCacheFilter.init(PushCacheFilter.java:114)
at org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:136)


again, whatever I'm doing is just uninformed guesswork from incomplete knowledge.  the reason for various features is to support 100/100 lighthouse score on hnpwa or thereabouts.

roughly speaking, jetty should be able to host e.g. https://github.com/dsolimando/hnpwa-mobileelements  with http2-push as designed.  adding an additional rest-api is the tweak you need to be able to drive the static content with java backend frameworks .





On Sun, Feb 17, 2019 at 11:54 AM James Northrup <jim@xxxxxxxxxxx> wrote:

On Fri, Feb 15, 2019 at 2:59 PM Simone Bordet <sbordet@xxxxxxxxxxx> wrote:
Hi,


On Fri, Feb 15, 2019 at 6:29 AM James Northrup <jim@xxxxxxxxxxx> wrote:
>
> revising the servletcontextholder changes the result:   https://gist.github.com/jnorthrup/792a43d73178ee38d686035fca3d146d

It NPEs at PushCacheFilter.java:114, which is:

config.getServletContext().setAttribute(config.getFilterName(), this);

A NPE there is not possible, unless "config" is null, or the
ServletContext is null.
In both cases it is a major break of the implementation of the Servlet
specification, which I doubt it's the case (we would have a million
reports by now).

Have you tried to _not_ use coroutines, at least to initialize Jetty?

I would recommend that you start with the simplest possible Jetty
server configuration: a server, one connector, one
ServletContextHandler.
Try that and see if it works. Then start adding things until it breaks.

Since it's Kotlin, try also to write it in pure Java first and then
convert to Kotlin.

--
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-users

Back to the top