Porting V6 App to V7 - Servlet Configuration

Hey guys,

i’ve got this snippet:


public class TableTestApplication extends Application {

    /** Main Window */
    private Window window;

    @Override
    public void init() {
        window = new Window("MyCaption");

        setMainWindow(window);
        window.setScrollable(true);
        window.setSizeFull();
        window.getContent().setSizeUndefined();

        this.tab1 = createTab1();
        this.tab2 = createTab2();


        window.addComponent(tab1);
    }
}

......

I want to port this application to V7 as easy as pissible. So i changed it (like the guide said) to :


public class TableTestApplication extends LegacyApplication {

    /** Main Window */
    private LegacyWindow window;

    @Override
    public void init() {
        window = new LegacyWindow("MyCaption");

        setMainWindow(this.window);
        //this.window.setScrollable(true);
        this.window.setSizeFull();
        this.window.getContent().setSizeUndefined();

        this.tab1 = createTab1();
        this.tab2 = createTab2();


        this.window.addComponent(this.tab1);
	}
}

......

So after compiling with no errors, ive got this message from jetty:

"java.lang.ClassNotFoundException: com.vaadin.terminal.gwt.server.ApplicationServlet … … … … " and a 503 in browser.

(and some more exceptions, but this is the first one)

mhh sure. in the web.xml is written:


    <servlet>
        <servlet-name>Vaadin Application Servlet</servlet-name>
        <servlet-class>com.vaadin.terminal.gwt.server.ApplicationServlet</servlet-class>
        <init-param>
            <description>Vaadin application class to start</description>
            <param-name>application</param-name>
            <param-value>com.vaadin.TestApplication</param-value>
        </init-param>
        <init-param>
            <description>Application widgetset</description>
            <param-name>widgetset</param-name>
            <param-value>com.vaadin.gwt.MyOwnWidgetSet</param-value>
        </init-param>
    </servlet>

but in V7 the correct Servlet path is : com.vaadin.server.VaadinServlet , correct?
But if i change this, i have to change the Param-name to UI as well, and after that i have to extend UI instead of LegacyApplication.

So what to do now?

You need to change it to com.vaadin.server.LegacyVaadinServlet.

More Information

Puh, thanks a lot. it works now.
its now :


 <servlet>
        <servlet-name>Vaadin Application Servlet</servlet-name>
        <servlet-class>com.vaadin.server.LegacyVaadinServlet</servlet-class>
        <init-param>
            <description>Vaadin application class to start</description>
            <param-name>application</param-name>
            <param-value>com.vaadin.TestApplication</param-value>
        </init-param>
        <init-param>
            <description>Application widgetset</description>
            <param-name>widgetset</param-name>
            <param-value>com.vaadin.gwt.MyOwnWidgetSet</param-value>
        </init-param>
    </servlet>

i googled hard, but didn’t find that topic. so thanks. may i used the wrong keywords.

i still getting the


2013-08-29 12:02:18.214:WARN:oejs.ServletHandler:
javax.servlet.ServletException: com.vaadin.server.ServiceException: com.vaadin.server.ServiceException: No UIProvider has been added and there is no "UI" init parameter.

error . butt it think i may fix this by myself… maybe playing around with classes, and servelts and so … may this will fix it… .:-/

Got it :wink: thanks :slight_smile: