-
Notifications
You must be signed in to change notification settings - Fork 3
Examples
Pierre PINON edited this page Jul 21, 2014
·
6 revisions
Download JettyBootstrap examples here !
public class Main {
public static void main(String[] args) throws JettyBootstrapException {
JettyBootstrap.startSelf();
}
}
public class Main {
public static void main(String[] args) throws JettyBootstrapException {
JettyBootstrap jettyBootstrap = new JettyBootstrap();
jettyBootstrap.addWarApp("/tmp/myApp.war");
jettyBootstrap.startServer();
}
}
public class Main {
public static void main(String[] args) throws JettyBootstrapException {
JettyBootstrap jettyBootstrap = new JettyBootstrap();
jettyBootstrap.addWarAppFromClasspath("/myApp.war");
jettyBootstrap.startServer();
}
}
public class Main {
public static void main(String[] args) throws JettyBootstrapException {
JettyConfiguration jettyConfiguration = new JettyConfiguration();
jettyConfiguration.setJettyConnectors(JettyConnector.HTTP, JettyConnector.HTTPS);
jettyConfiguration.setRedirectWebAppsOnHttpsConnector(true);
JettyBootstrap jettyBootstrap = new JettyBootstrap(jettyConfiguration);
jettyBootstrap.addStaticResourceFromClasspath("/staticResource", "/staticContext");
jettyBootstrap.addWarApp("/tmp/myWar.war", "/myApp");
jettyBootstrap.startServer();
}
}