Don't use the uber jar as a dependency in your project. That's not what its intended for <https://dev.eclipse.org/mhonarc/lists/jetty-users/msg06030.html>.
Here's an example of using Jetty, in embedded mode, with servlets + websockets + static content. All wrapped up in a tidy uber-jar for yourself. https://github.com/jetty-project/embedded-jetty-uber-jar You can also look into the cookbook for other examples of how to do things in embedded jetty. https://github.com/jetty-project/embedded-jetty-cookbook Joakim Erdfelt / [email protected] On Wed, Oct 21, 2015 at 3:59 PM, Ayman Habib <[email protected]> wrote: > Hi All, > > I have a Java application that I'd like to have communicate with the > Browser using Websockets. Jetty seems like a perfect fit, because of its > small footprint. I was able to embed the jar file > jetty-all-9.3.3.*-uber.jar as a library in my application and launch the > server but when I open the browser I get the error below. How do I set the > Context in this arrangement to serve the files from a specific local > directory? > > Any pointers would be greatly appreciated. > > Thanks much, > -Ayman > HTTP ERROR: 404 > > Problem accessing /. Reason: > > Not Found > > > > _______________________________________________ > jetty-users mailing list > [email protected] > To change your delivery options, retrieve your password, or unsubscribe > from this list, visit > https://dev.eclipse.org/mailman/listinfo/jetty-users >
_______________________________________________ jetty-users mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
