Package com.vaynberg.wicket.select2

Source Code of com.vaynberg.wicket.select2.StartSelect2Examples

package com.vaynberg.wicket.select2;

import org.apache.wicket.util.time.Duration;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.bio.SocketConnector;
import org.eclipse.jetty.webapp.WebAppContext;

public class StartSelect2Examples {
    public static void main(String[] args) throws Exception {
  int timeout = (int) Duration.ONE_HOUR.getMilliseconds();

  Server server = new Server();
  SocketConnector connector = new SocketConnector();

  // Set some timeout options to make debugging easier.
  connector.setMaxIdleTime(timeout);
  connector.setSoLingerTime(-1);
  connector.setPort(8080);
  server.addConnector(connector);

  WebAppContext bb = new WebAppContext();
  bb.setServer(server);
  bb.setContextPath("/");
  bb.setWar("src/main/webapp");

  server.setHandler(bb);

  try {
      System.out.println(">>> STARTING EMBEDDED JETTY SERVER, PRESS ANY KEY TO STOP");
      server.start();
      System.in.read();
      System.out.println(">>> STOPPING EMBEDDED JETTY SERVER");
      server.stop();
      server.join();
  } catch (Exception e) {
      e.printStackTrace();
      System.exit(1);
  }
    }
}
TOP

Related Classes of com.vaynberg.wicket.select2.StartSelect2Examples

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.