Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] How to set Context

Don't use the uber jar as a dependency in your project.
That's not what its intended for.

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 / joakim@xxxxxxxxxxx

On Wed, Oct 21, 2015 at 3:59 PM, Ayman Habib <aymanwhabib@xxxxxxxxx> 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
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


Back to the top