eclipse - Vaadin 7.1.0 - DefaultWidgetSet can't be found -


i new vaadin , trying tests technology. set project maven project under eclipse tomcat 7 server.

at first started vaadin 7.0.0 , works fine. change version 7.0.0 7.1.0 because test push functionality. vaadin 7.0.0 works fine, since changed version error:

requested resource [/vaadin/widgetsets/com.vaadin.defaultwidgetset   /com.vaadin.defaultwidgetset.nocache.js] not found filesystem or through class loader. add widgetset and/or theme jar classpath or add files webcontent/vaadin folder. 

i've read defaultwidget created vaadin how can that?

unless add new client-side components vaadin project, don't need compile widgetset. however, default configuration of vaadin assumes have one. past error remove <init-param> tag widgetset in web.xml.

<servlet>     <servlet-name>your-servlet-name</servlet-name>     <servlet-class>com.vaadin.server.vaadinservlet</servlet-class>     <init-param>         <param-name>ui</param-name>         <param-value>com.example.myui</param-value>     </init-param>     <init-param>         <param-name>widgetset</param-name>         <param-value>another.path</param-value>     </init-param> </servlet> 

alternatively, can create .xml file in same package (e.g. mywset.xml) ui class, , reference in web.xml.

mywset.xml in com.example package:

<?xml version="1.0" encoding="utf-8"?> <!doctype module public "-//google inc.//dtd google web toolkit 1.7.0//en" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd"> <module>     <inherits name="com.vaadin.defaultwidgetset" /> </module> 

the right web.xml:

<servlet>     <servlet-name>your-servlet-name</servlet-name>     <servlet-class>com.vaadin.server.vaadinservlet</servlet-class>     <init-param>         <param-name>ui</param-name>         <param-value>com.example.myui</param-value>     </init-param>     <init-param>         <param-name>widgetset</param-name>         <param-value>com.example.mywset</param-value>     </init-param> </servlet> 

remember, don't need .xml suffix in web.xml. finally, run mvn vaadin:compile compile widgetset.


Comments