Deployed War Problem

Hi, Recently I update vaadin plugin. But when I export war file it is ok. This war file run on my local tomcat server(7.0.34). But When I upload on live server(tomcat 6) it gets error. Not running. When I extract war file, I see there have not web.xml file.
My Code:

import javax.servlet.annotation.WebServlet;

import com.vaadin.annotations.Theme;
import com.vaadin.annotations.VaadinServletConfiguration;
import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinServlet;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Label;
import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;

public class TeUI extends UI {

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

protected void init(VaadinRequest request) {
    final VerticalLayout layout = new VerticalLayout();

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


Hello Bishwajit barua,

This doesn’t work on Tomcat 6.x as its not Servlet 3.0 spec Complaint. Your war would work on any web container that is Servlet 3.0 Complaint. Pls refer this
for Tomcat Versions that support Servelt 3.0 specification. As Tomcat 6 is not servlet 3.0 complaint you need to add a web.xml file under WEB-INF folder. To start with please use the following as the starting point for your app to work.

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi=""
    xmlns="" xmlns:web=""
            Vaadin production mode

Hope this helps you. Also please feel free to modify the above web.xml based on your needs.


Thnx Krishna, It works good with web.xml.