Is logout impossible while in Eclipse?

I created this utterly simple example app to try quitting the Vaadin app by sending the user to a static web page.

But while running inside Eclipse Indigo with Tomcat 7.0.27, I get a 404 error: The requested resource (/logout.html) is not available.
…for the URL:
http://localhost:8080/logout.html

I followed the Book of Vaadin exactly. Here’s the entire app code in this one file.

package com.example.testclose;

import com.vaadin.Application;
import com.vaadin.ui.*;
import com.vaadin.ui.Button.ClickEvent;

public class TestcloseApplication extends Application {
	@Override
	public void init() {
	    System.out.println("Basil - Running init() method on TestcloseApplication class. " + new java.util.Date() );
	    this.setLogoutURL( "/logout.html" );
	    
		Window mainWindow = new Window("Testclose Application");
		
		// Quit app button.
		Button quitButton = new Button("Quit");
		quitButton.addListener( new Button.ClickListener() {
            
            @Override
            public void buttonClick( ClickEvent event ) {
               event.getComponent().getApplication().close();
                
            }
        } );
		mainWindow.addComponent( quitButton );
		
		setMainWindow(mainWindow);
	}

}

Here’s the little HTML page, in a file named “logout.html” in the WebContent folder at this path:
/Users/basilbourque/Documents/workspace/TestClose/WebContent/logout.html

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>

<p>Game over, dude.</p>

</body>
</html>

I have multiple Vaadin apps that run well in Eclipse, so I believe I have both Eclipse WTP and Tomcat configured properly.

Why can’t I make a simple app logout? Is this just not possible in Eclipse+WTP+Tomcat?

–Basil Bourque

I would say, your URL is just missing the Context-Root of your web-application. You can check it in the Properties of the Web-Project. Not exactly sure how the category is named (and no eclipse available to check), but it will be something like “Web Application Settings” or the like.