Finding starting class in the class path

I suspect this is not a true Vaadin problem, but perhaps some of you have run across it and can help me. I am trying to get a very simple Vaadin app running in a application server integrated into Eclipse (Juno). I am using Vaadin 6.8.2. My project is a Maven project as I could not find any “web application” projects that fit the bill. I am using “jetty:run” as a goal and my web.xml looks like this:


	<servlet>
		<servlet-name>myservlet</servlet-name>
		<servlet-class>
			com.vaadin.terminal.gwt.server.ApplicationServlet
		</servlet-class>
		<init-param>
			<param-name>application</param-name>
			<param-value>TestApp</param-value>
		</init-param>
	</servlet>
	
	<servlet-mapping>
		<servlet-name>myservlet</servlet-name>
		<url-pattern>/test-app</url-pattern>
	</servlet-mapping>

TestApp is in (from the project folder) src/main/java… (for Maven) …/com/catalystitservices/vaadin/… (the package) … TestApp.java. It compiles and goes into the war file in WEB-INF/classes/com/catalystitservices/vaadin/TestApp.class just like it should.

Now I run jetty:run and the jetty server starts fine. I go to a browser and go to the address http://localhost:8080/test-app. I get this error:


HTTP ERROR 500

Problem accessing /test-app. Reason:

    Failed to load application class: TestApp
Caused by:

javax.servlet.ServletException: Failed to load application class: TestApp
	at com.vaadin.terminal.gwt.server.ApplicationServlet.init(ApplicationServlet.java:71)
	at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:512)

…etc. ApplicationServlet is just trying to load the class with a classLoader:


       try {
            applicationClass = (Class<? extends Application>) getClassLoader()
                    .loadClass(applicationClassName);
        } catch (final ClassNotFoundException e) {
            throw new ServletException("Failed to load application class: "
                    + applicationClassName);
        }

…so I’m guessing the classLoader can’t find TestApp. What am I doing wrong?

You need to have the application param-value in web.xml to have fully qualified class name.

I had tried this with slashes but I tried it with dot notation and it worked. Thanks.