HTTP Status 404 - /VaadinProject2/

hi guys,

i use the latest versions tomcat 7, eclipse ee luna, vaadin 7,

i have some problems in understanding how are running the projects,
i created a fresh project that runs fine:

package com.example.vaadinproject;

@SuppressWarnings(“serial”)
@Theme(“vaadinproject”)
public class Vaadinproject2UI extends UI {

@WebServlet(value = "/*", asyncSupported = true)
@VaadinServletConfiguration(productionMode = false, ui = VaadinprojectUI.class)
public static class Servlet extends VaadinServlet {
}

@Override
protected void init(VaadinRequest request) {
    final VerticalLayout layout = new VerticalLayout();
    layout.setMargin(true);
    setContent(layout);

    Button button = new Button("Click Me");
    button.addClickListener(new Button.ClickListener() {
        public void buttonClick(ClickEvent event) {
            layout.addComponent(new Label("Thank you for clicking"));
        }
    });
    layout.addComponent(button);
}

}

when i delete the first part from this class following the tutorial on youtube:

@SuppressWarnings(“serial”)
@Theme(“vaadinproject2”)
public class Vaadinproject2UI extends UI {

FilesystemContainer docs = new FilesystemContainer(new File("/tmp/docs"));
ComboBox docList = new ComboBox("Documents", docs);

@Override
protected void init(VaadinRequest request) {
    
    setContent(docList);
}

}

is not running the project, it gives me this error: HTTP Status 404 - /VaadinProject2/
i think is because of this new stuff with annotation, and not needing no more of web.xml

if someone can help understand why is not finding my project when i run

thanks

You need to define your servlets somehow, either through annotations or through web.xml. The first example uses the Servlet 3.0 specification to define servlets through annotations, in this case the web.xml file is not needed. If you remove the first part, then you need to include a web.xml in order for Tomcat to be able to deploy your application.

Thanks.