// be bootstrapped
// from the ServletContextInitializer in the web.xml
final IsisConfiguration configuration = isisConfigurationBuilder.getConfiguration();
final int port = configuration.getInteger(EMBEDDED_WEB_SERVER_PORT_KEY, EMBEDDED_WEB_SERVER_PORT_DEFAULT);
final String webappContextPath = configuration.getString(EMBEDDED_WEB_SERVER_RESOURCE_BASE_KEY, EMBEDDED_WEB_SERVER_RESOURCE_BASE_DEFAULT);
final StartupMode startupMode = StartupMode.lookup(configuration.getString(EMBEDDED_WEB_SERVER_STARTUP_MODE_KEY, EMBEDDED_WEB_SERVER_STARTUP_MODE_DEFAULT));
jettyServer = new Server(port);
final WebAppContext context = new WebAppContext(SRC_MAIN_WEBAPP, webappContextPath);
copyConfigurationPrimersIntoServletContext(context);
jettyServer.setHandler(context);
try {
jettyServer.start();
if (startupMode.isForeground()) {
jettyServer.join();
}
} catch (final Exception ex) {
throw new IsisException("Unable to start Jetty server", ex);
}