thats correct, creating a server object is the easiest way.
In an app context I had:
Code:
<bean id="httpServer" class="some.package.server.JettyServer" init-method="init"
destroy-method="stop">
And, the server class would wire it up:
Code:
public void init() throws IOException, IllegalAccessException, Exception {
log.info("init of JettyServer");
log.info("Adding socket listener: " + socketListener);
httpServer.addListener(socketListener);
log.info("Adding HTTP context: " + httpContext);
and so forth...
}
But, it would be nice if there were already a Jetty server bean. And, an easier way of setting non-javabean properties.