Skip to content

Commit

Permalink
Step 2 | 02:34 | Replace servlet annotations with CDIUI annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
amahdy committed Jun 1, 2017
1 parent 86f4376 commit f6e9142
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/main/java/org/vaadin/stepbystep/MyUI.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package org.vaadin.stepbystep;

import javax.servlet.annotation.WebServlet;

import com.vaadin.annotations.Theme;
import com.vaadin.annotations.VaadinServletConfiguration;
import com.vaadin.cdi.CDIUI;
import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinServlet;
import com.vaadin.ui.Button;
import com.vaadin.ui.Label;
import com.vaadin.ui.TextField;
Expand All @@ -20,6 +17,7 @@
* overridden to add component to the user interface and initialize non-component functionality.
*/
@Theme("mytheme")
@CDIUI("")
public class MyUI extends UI {

@Override
Expand All @@ -39,9 +37,4 @@ protected void init(VaadinRequest vaadinRequest) {

setContent(layout);
}

@WebServlet(urlPatterns = "/*", name = "MyUIServlet", asyncSupported = true)
@VaadinServletConfiguration(ui = MyUI.class, productionMode = false)
public static class MyUIServlet extends VaadinServlet {
}
}

0 comments on commit f6e9142

Please sign in to comment.