Vaadin issues... continues...

I admit that I am pretty new to all this but still assuming should not face so many issues…

Here is the stuff:

I have default vaadin app created as follows:
package vik.sakshum.sakshumweb.server;

import java.util.Date;

import com.vaadin.Application;
import com.vaadin.ui.Button;
import com.vaadin.ui.Label;
import com.vaadin.ui.Window;
import com.vaadin.ui.Button.ClickEvent;

public class SubscribeModule extends Application{

@Override
public void init() {
	 final Window mainWindow = 
	      new Window("Sakshum Application");
	   Label label = new Label("Hello Vik");
	   mainWindow.addComponent(label);
	   mainWindow.addComponent(
	      new Button("What is the time?",
	         new Button.ClickListener() {
	         public void buttonClick(ClickEvent event) {
	            mainWindow.showNotification(
	               "The time is " + new Date());
	         }
	      }));
	   setMainWindow(mainWindow);
	
}

}

The web.xml shows it as:

SubscribeModule
com.vaadin.terminal.gwt.server.GAEApplicationServlet

Subscribe/Unsubscribe module
application
vik.sakshum.sakshumweb.server.SubscribeModule



SubscribeModule
/*

So, if i run it as a web app it comes fine with the url: http://localhost:3187/Sakshumweb2.0

However, as per my requirements I need to embed it into a web page. So for that reasons i created a page index.html in the war folder. Here comes the real problem. If i run it as http://localhost:3187/Sakshumweb2.0/index.html it still shows me vaadin widget. Someone suggested me that it is due to default url patter /. Fair enough I replaced the url pattern to /server/

Now if i run http://localhost:3187/Sakshumweb2.0/index.html this works fine. But i m now unable to run the vaadin widget using http://localhost:3187/Sakshumweb2.0/server or http://localhost:3187/Sakshumweb2.0/server/SubscribeModule

So what i m missing here? please help me to get going on this

Try to register /VAADIN/* also to point to the servlet by adding this to your web.xml:


<servlet-mapping>
<servlet-name>SubscribeModule</servlet-name>
<url-pattern>/VAADIN/*</url-pattern>
</servlet-mapping>

For more info, see
http://vaadin.com/book/-/page/application.environment.html

Ok as you suggested now the new web.xml has

SubscribeModule com.vaadin.terminal.gwt.server.GAEApplicationServlet Subscribe/Unsubscribe module application vik.sakshum.sakshumweb.server.SubscribeModule SubscribeModule /server/*
<servlet-mapping>
	<servlet-name>SubscribeModule</servlet-name>
	<url-pattern>/VAADIN/*</url-pattern>
</servlet-mapping>

And in my war folder i have index.html and SubscribeModule is as specified in war.xml as servlet class

Now, when i run /Sakshumweb2.0/index.html I see 404 not found error and same 404 if i run
http://localhost:3041/Sakshumweb2.0/server/SubscribeModule

So now after this nothing is working finally. I will definitely write a new blog or a booklet based on my experience to make it working for an example for people beginner like me.

any help on this plz? I am just stuck on it and cant do any real work

This exact setup works for me. What container are you running, in what environment ? Is this tomcat standalone, tomcat under resin ? The fact that you no longer see your html file is deeply suspicious if you have indeed mapped /server/* and /VAADIN/* to your servlet. Something else is broken.

hmm so the issue was specifying web context root in the url…

I was accessing it as http://localhost:1234/Sakshumweb2.0/index.html instead of http://localhost:1234/index.html
Tx… your stmt gave me a moral boost to rethink

Vik