Failed to load the bootstrap javascript: ./../VAADIN/vaadinBootstrap.js

Hi everyone,

I am having an issue when attempting to get to my Vaadin Web Application.

Vaadin 7.2.0, Tomcat 7, Java 7

So the situation is, we are deploying the Vaadin application as a jar file to be a a User Interface to an existing Java / Tomcat application.

There is already a servlet and User Interface defined in the existing application (in Web.xml), but we want to deploy to it a new User Interface written in Vaadin.

So, I exported the Vaadin application as UI.jar, put it into WEB-INF/lib/ (along with all necessary vaadin jar files), and referenced it in web.xml on the Root Context Path “/*” and everything works great.

Now, the application already had a User Interface, and I don’t want to hide that, so I want to use “/UI/" instead of "/”, and allow the user the choice of going to the original User Interface, or using the New Vaadin one.

So I change web.xml and the context path from “/" to "/UI/”.

Now, I get the following error when attempting to Navigate to “http://[IP-Address]

Failed to load the bootstrap javascript: ./…/VAADIN/vaadinBootstrap.js

It looks like the relative path is somehow screwed up.

I saw in another thread another user mentioned a similar issue happening to him: However, this was a year ago and did not seem to go anywhere:!/thread/2438273

"I think the code that creates the relative path to vaadin folder needs a bit more work…
Not sure this is exactly the same problem but still similar…
Adding more slashes at the end of the path also produces the same error…

These examples work just fine
http://localhost/MyApp/ → vaadin will use ./VAADIN/* as path…
http://localhost/MyApp/MySpecialSubFolder/ → vaadin will use ./…/VAADIN/* as path…

BUT in the case of just adding slashes you get the wrong path to VAADIN and
http://localhost/MyApp/// → vaadin will still use ./VAADIN/* as path… and this will fail!!"

This sounds very similar to what’s happening to us, but I have been looking everywhere and cannot find anyone who has seen a solution to this, or even mentions what appears to be happening to us other than this one person.

Does anyone have any idea what I can try next or what could be causing this?

Does this look like a Vaadin bug?

Hello There,

The solution is already there in that thread itself, but anyway, in brief following the solution that should work

If you are using Servlet 3.0 spec please add the following to the @Webservlet annotation

@WebServlet(value = {"/UI/*",/VAADIN/*}) If you have web.xml please add the following configuration



VaadinServlet /VAADIN/* [/code]Hope this helps you.
  • Krishna


Thank you so much!

I must have missed the solution in the other thread.