title: Login form in Vaadin
body: <p>I am creating a new login form using Vaadin. I have 2 classes as below:</p>
  
  <p>LoginUI.java is the base class which inokes the LoginView.java containing the code for Login page. Its still a prototype and have not implemented the listeners. But, when I deploy and run on tomcat I see blank page without anythign displayed. Can someone please help? </p>
  
  <p><strong>LoginUI.java - Base class</strong> </p>
  
  <pre class="lang-java prettyprint-override"><code> public class LoginUI extends UI {
  
      @WebServlet(value = "/*", asyncSupported = true)
      @VaadinServletConfiguration(productionMode = false, ui = LoginUI.class)
      public static class Servlet extends VaadinServlet {
      }
  
      @Override
      protected void init(VaadinRequest request) {
          LoginView view  = new LoginView();
          setContent(view);
      }
  }
  </code></pre>
  
  <p><strong>LoginView.java</strong></p>
  
  <pre class="lang-java prettyprint-override"><code>public class LoginView extends VerticalLayout implements ClickListener  {
  
      /**
       * 
       */
      private static final long serialVersionUID = 1L;
  
      private final Label feedback;
  
      private final TextField username;
      private final TextField password;
  
      private final Button registerBtn;
      private final Button loginBtn;
      private HorizontalLayout layout= new HorizontalLayout();
  
      public LoginView() {
  
          feedback = new Label();
          layout.addComponent(feedback);
  
          username = new TextField("Username");
          username.setWidth("100%");
          username.setNullRepresentation("");
          layout.addComponent(username);
  
          password = new TextField("Password");
          password.setWidth("100%");
          password.setNullRepresentation("");
          layout.addComponent(password);
  
          loginBtn = new Button("Sign In");
          layout.addComponent(loginBtn);
  
          registerBtn = new Button("Register");
          layout.addComponent(registerBtn);
          setSizeFull();
      }
  
  
      public void buttonClick(ClickEvent event) {
          if (event.getButton().equals(loginBtn)) {
              String username = (String) this.username.getValue();
              String password = (String) this.password.getValue();
              Notification.show("User Present");
          }
      }
  }
  </code></pre>