Eddy Young
Posts: 1
Nickname: jeyoung439
Registered: Jun, 2005
|
|
Re: embedded jetty
|
Posted: Jun 27, 2005 11:12 AM
|
|
> I am using jetty as embedded server as part of other > application. The problem I have is I can't seem to start > the server. The file (i'm pretty new to java, so this is > probably a sloppy programming style): > ---------- > // import org.mortbay.jetty.Server; and all files > dependecies needed > public class startserver { > public void starting() throws IOException { > Server server = new Server(); > SocketListener listener = new SocketListener(); > listener.setPort(9999); server.addListener(listener); > server.addWebApplication("localhost","root of the web > eb app in physical dir"); > try { > server.start(); > } catch (MultiException e) { > throw new RuntimeException("Exception starting > ion starting Jetty", e); > } > } > > public static void main(String args[]) { > startserver ss = new startserver(); > try { > ss.starting(); > } catch (IOException o) { > throw new RuntimeException("Error...........", > ..........", o); > } > } > } > ------------------ > This compiled fine, but the when I tried to execute, I got > the exception error ('Exception starting Jetty' error) > when trying to start the server. Any suggestion will be > very much helpful. > > Thx, > crue
You ha
|
|