Gigi95

The first part

Apr 17th, 2018
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.04 KB | None | 0 0
  1. package com.library.librarytest;
  2.  
  3. import javax.servlet.annotation.WebServlet;
  4.  
  5. import com.vaadin.annotations.Theme;
  6. import com.vaadin.annotations.VaadinServletConfiguration;
  7. import com.vaadin.server.VaadinRequest;
  8. import com.vaadin.server.VaadinServlet;
  9. import com.vaadin.ui.UI;
  10.  
  11. /**
  12.  * This UI is the application entry point. A UI may either represent a browser window
  13.  * (or tab) or some part of an HTML page where a Vaadin application is embedded.
  14.  * <p>
  15.  * The UI is initialized using {@link #init(VaadinRequest)}. This method is intended to be
  16.  * overridden to add component to the user interface and initialize non-component functionality.
  17.  */
  18. @Theme("mytheme")
  19. public class MyUI extends UI {
  20.  
  21.     @Override
  22.     protected void init(VaadinRequest vaadinRequest) {
  23.         setContent(new HelloWorld());
  24.     }
  25.  
  26.     @WebServlet(urlPatterns = "/*", name = "MyUIServlet", asyncSupported = true)
  27.     @VaadinServletConfiguration(ui = MyUI.class, productionMode = false)
  28.     public static class MyUIServlet extends VaadinServlet {
  29.     }
  30. }
Add Comment
Please, Sign In to add comment