1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/src/main/java/ru/indvdum/mywork/MyWork.java Sat Feb 05 14:05:29 2011 +0300
1.3 @@ -0,0 +1,39 @@
1.4 +package ru.indvdum.mywork;
1.5 +
1.6 +import java.util.Date;
1.7 +
1.8 +import org.mortbay.jetty.Connector;
1.9 +import org.mortbay.jetty.Server;
1.10 +import org.mortbay.jetty.servlet.Context;
1.11 +import org.mortbay.jetty.servlet.ServletHolder;
1.12 +import org.mortbay.jetty.webapp.WebAppContext;
1.13 +
1.14 +import com.vaadin.terminal.gwt.server.ApplicationServlet;
1.15 +
1.16 +/**
1.17 + * @author indvdum
1.18 + *
1.19 + */
1.20 +public class MyWork {
1.21 +
1.22 + /**
1.23 + * @param args
1.24 + * @throws Exception
1.25 + */
1.26 + public static void main(String[] args) throws Exception {
1.27 + Server server = new Server();
1.28 + Connector connector = new org.mortbay.jetty.nio.SelectChannelConnector();
1.29 + connector.setPort(8080);
1.30 + connector.setMaxIdleTime(720000);
1.31 + server.addConnector(connector);
1.32 +
1.33 + Context root = new Context(server, "/", Context.SESSIONS);
1.34 + ServletHolder vaadinServlet = new ServletHolder(new ApplicationServlet());
1.35 + vaadinServlet.setInitParameter("application", "ru.indvdum.mywork.vaadin.MyWorkApplication");
1.36 + root.addServlet(vaadinServlet, "/*");
1.37 +
1.38 + server.start();
1.39 + System.out.println("Jetty server started at " + new Date());
1.40 + }
1.41 +
1.42 +}
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/src/main/java/ru/indvdum/mywork/vaadin/MyWorkApplication.java Sat Feb 05 14:05:29 2011 +0300
2.3 @@ -0,0 +1,20 @@
2.4 +package ru.indvdum.mywork.vaadin;
2.5 +
2.6 +import com.vaadin.Application;
2.7 +import com.vaadin.ui.Label;
2.8 +import com.vaadin.ui.Window;
2.9 +
2.10 +/**
2.11 + * @author indvdum
2.12 + *
2.13 + */
2.14 +public class MyWorkApplication extends Application {
2.15 +
2.16 + @Override
2.17 + public void init() {
2.18 + Window window = new Window();
2.19 + setMainWindow(window);
2.20 +
2.21 + }
2.22 +
2.23 +}