VAADIN/vaadinBootstrap.js - url mapping change

Hi folks.

I’ve got a problem that I’m struggling to overcome. I’m writing an app utilizing vaadin in a spring application.

I’ve set up the url mapping in application.properties:
vaadin.servlet.url-mapping=/myApp
vaadin.servlet.resources=/myApp

so that it’s hosted at:
http://localhost:8888/myApp/

When I call this, it’s looking for the vaadinBootstrap at:
http://localhost:8888/myApp/VAADIN/vaadinBootstrap.js?v=7.6.3

But it’s unable to find it because it’s still being compiled at:
http://localhost:8888/VAADIN/vaadinBootstrap.js?v=7.6.3

So how do I compile the vaadin features (specifically bootstrap + widgetsets), so that they’re at the desired location?

Thanks for the help!

You’ll need to map both /myApp and /VAADIN to the Vaadin Servlet. Not entirely sure what the syntax is for the Spring properties file. This is how I configured the servlet using annotations @WebServlet(urlPatterns = {“/app/", "/VAADIN/”})

Thanks for your answer. The link below was close to what I was looking for (point III), but I wanted to have the files in a child directory of the app rather than /VAADIN…

https://vaadin.com/blog/-/blogs/optimizing-hosting-setup

I was never able to get the VAADIN core files to compile elsewhere in the project. But we’ll make the changes in nginx for now.