How to deploy an application with widget to a war file.

Hello,

I am using a responsive add-on to my project. I complied the widget and I am able to run the project on Eclipse. The version that I am using is Vaadin 7.1.9 and Eclipse Juno.

Then when I tried to export to a war file and deployed it on Jetty 8 and Jetty 9. I am getting the following errors for each.

in Jetty 8, I am getting back:
I am able to launch jetty but when I tried to access if from the browser I am getting back the following:
Widgetset does not contain implementation for com.vaadin.addon.responsive.Responsive. Check its component connector’s @Connect mapping, widgetsets GWT module description file and re-compile your widgetset. In case you have downloaded a vaadin add-on package, you might want to refer to add-on instructions.

in Jetty 9, I am getting back:
java.lang.IllegalStateException: Multiple servlets map to path: /*
at org.eclipse.jetty.servlet.ServletHandler.updateMappings(ServletHandle
r.java:1383)
at org.eclipse.jetty.servlet.ServletHandler.setServletMappings(ServletHa
ndler.java:1480)
at org.eclipse.jetty.servlet.ServletHandler.addServletMapping(ServletHan
dler.java:916)
at org.eclipse.jetty.annotations.WebServletAnnotation.apply(WebServletAn

Please note: I have another war file which got executed successfully in both Jetty 8 and Jetty 9.

With Jetty 8, I tried recompling the widgets again but I got back same error.

Here is my web.xml file:

<?xml version="1.0" encoding="UTF-8"?> Demo Vaadin production mode productionMode false Myrmnui Application com.demo.main.DemoResponsiveAppServlet Vaadin UI class UI com.demo.main.MainUI Application widgetset widgetset com.demo.main.widgetset.DemoWidgetset Application /* Application /VAADIN/*

Please let me know how can I deploy to a war file along with widget. I used eclipse to export to war file. To make sure that widget files exist, I unziped the war file and they are present. These files are not of zero file size.

Thanks in advance.

13374.zip (2.07 MB)

Please let me know if you need additional information.

Thanks

Here is a solution which I found: This works for Jetty 8. (For the people who come across this type of issue.)

In your VaadinServlet custom class, we need to specify widgetset package, see below:

    @WebServlet(value = {"/*", "/VAADIN/*"}, asyncSupported = true)
    @VaadinServletConfiguration(productionMode = false, ui = MainUI.class, widgetset="com.demo.main.widgetset.DemoWidgetset")