Server server = new Server();
Connector connector=new SelectChannelConnector();
WebAppContext webappcontext = new WebAppContext();
You can now access your webapp vial localhost:8080/foo.
If you want the main page to be served at http://localhost:8080/ ...use:
Just put all your static files in one directory and specify the path to
that directory using webappcontext.setWar("C:/path/to/your/folder");
The path can be absolute or relative.
Hope this helps,
This might have been already answered - pardon my ignorance. Could someone
post a snippet of code for using Jetty 6 in embedded mode to server static
This post has NOT been accepted by the mailing list yet.
Hi David, the below code works great but I have a problem rendering the images that html file uses any advice on how to fix this snippet of my code is the same as the one listed by David. Thanks in advance for your patience in responding to the same.