I am new to java vaadin framework. I have installed APACHE TOMCAT 6 and vaadin on my Eclipse Indigo and trying to develop my first project in it. But when i choose Debug on server or Run on server, i got 404 resource not found error. Dont understand why this is so. my code is :
package com.example.firstap;
import com.vaadin.Application;
import com.vaadin.ui.*;
public class FirstapApplication extends Application {
@Override
public void init() {
Window mainWindow = new Window("Firstap Application");
Label label = new Label("Hello Vaadin user");
mainWindow.addComponent(label);
setMainWindow(mainWindow);
}
}
This error can happen depending on how you click on “Debug on Server” or “Run on Server”.
Instead of selecting the main file (FirstapApplication.java) and clicking “Run”, click on the project name and select “Run on Server”. This will launch the app properly and bring up a web browser in Eclipse displaying the hello world.