Embedded Jetty why to use join

join() is blocking until server is ready. It behaves like Thread.join() and indeed calls join() of Jetty’s thread pool. Everything works without this because jetty starts very quickly. However if your application is heavy enough the start might take some time. Call of join() guarantees that after it the server is indeed ready.

Spring 3.1 WebApplicationInitializer & Embedded Jetty 8 AnnotationConfiguration

The problem is that Jetty’s AnnotationConfiguration class does not scan non-jar resources on the classpath (except under WEB-INF/classes). It finds my WebApplicationInitializer‘s if I register a subclass of AnnotationConfiguration which overrides configure(WebAppContext) to scan the host classpath in addition to the container and web-inf locations. Most of the sub-class is (sadly) copy-paste from the parent. … Read more

Configure SSL on Jetty

I had a lot of problems making it work but I finally foud out how to make it happend. I’m using ubuntu 10.04 with java 7. It may be possible to do it under windows but all the comands lines are bash commands, maybe possible to do the same with cigwin/mingw I used Jetty 8.1.8. … Read more

WARNING: The (sub)resource method contains empty path annotation

The warning means you have a resource method annotated with @Path(“https://stackoverflow.com/”) or @Path(“”). For instance @Path(“test”) public class Test { @GET @Path(“https://stackoverflow.com/”) public String test(){} } Not sure why Jersey would give a warning, maybe just to make sure that’s what you really want. The reason is that a resource method with @Path(“https://stackoverflow.com/”) is redundant, … Read more

Jetty Cross Origin Filter

Aloha, I fought this for awhile as well, and found that the final node needs to be: <filter-mapping> <filter-name>cross-origin</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> NOT <filter-mapping> <filter-name>cross-origin</filter-name> <filter-pattern>/*</filter-pattern> </filter-mapping> Here is the link I found to help me: wiki.eclipse.org/Jetty/Feature/Cross_Origin_Filter After I updated my web.xml file and restarted the jetty server, I was able to make cross domain request … Read more

NoClassDefFoundError: org/w3c/dom/ElementTraversal

It looks like ElementTraversal is part of xml-apis-2.10.0.jar which should have been provided with your Shibboleth installation. So if you were following these instructions you should also have followed this step: Endorse Xerces and Xalan by creating the directory JETTY_HOME/lib/endorsed/ and copy the .jar files included in the IdP source endorsed/ directory into the newly … Read more

How does jetty handle multiple requests

This can be answered at so many levels I have been staring at it for two days trying to figure out how answer it…so I’ll take a kinda high level shot at it. There is this server port that jetty listens on and some number of acceptor threads whose job it is to get connection … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)