Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Widgetset gets not found (perhaps ServletMappings?)
Hi,
somehow I don't see what the error is ... In my application I have a custom widgetset and theme, both are located unter VAADIN/widgetsets respectively VAADIN/themes in the root of my WAR-File.
The Vaadin-Servlet is mapped like this:
public class WebContextInitializer implements WebApplicationInitializer {
@Override
public void onStartup(javax.servlet.ServletContext servletContext)
throws ServletException {
final AnnotationConfigWebApplicationContext context =
new AnnotationConfigWebApplicationContext();
// scan *.config-package
context.scan(WebContextInitializer.class.getPackage().getName());
servletContext.addListener(new ContextLoaderListener(context));
registerServlet(servletContext);
}
private void registerServlet(ServletContext servletContext) {
ServletRegistration.Dynamic dispatcher = servletContext.addServlet(
"vaadin", SpringVaadinServlet.class);
dispatcher.setLoadOnStartup(1);
dispatcher.addMapping("/*");
// dispatcher.addMapping("/VAADIN/*");
}
}
The UI is annotated like this
@Theme("my-theme")
@Widgetset("de.tobiasdemuth.vaadin.MyWidgetset")
@SpringUI
public class MyUI extends UI {
@Autowired
private String text;
@Override
protected void init(VaadinRequest vaadinRequest) {
// left out
}
}
When opening the application in the Browser both ./VAADIN/themes/my-theme/styles.css and ./VAADIN/widgetsets/de.tobiasdemuth.vaadin.MyWidgetset/de.tobiasdemuth.vaadin.MyWidgetset-noCache.js are requested but return a 404. What am I missing here?
kind regards
Tobias
Ok, Tomcat just uses the files under src not those under target.