Vaadin 7.1 + Tomcat 7 + Form Login

Hi!
Has anybody succeeded with implementing web.xml Form Login with Vaadin 7.1 (or 7.0)? Basic Login works as expected, but I can’t make Form Login work. Everything I get in browser, instead of the form, is following error:


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

My web.xml contains:

<security-constraint> <display-name>SecureApplicationConstraint</display-name> <web-resource-collection> <web-resource-name>Vaadin application</web-resource-name> <description>The entire Vaadin application is protected</description> <url-pattern>/*</url-pattern> </web-resource-collection> <auth-constraint> <description/> <role-name>*</role-name> </auth-constraint> </security-constraint> <login-config> <auth-method>FORM</auth-method> <realm-name>default</realm-name> <form-login-config> <form-login-page>/login.jsp</form-login-page> <form-error-page>/loginError.jsp</form-error-page> </form-login-config> </login-config>
“*” role is allowed by allRolesMode=“authOnly” in realm.

I also tried to set my app path (@WebServlet value) to /app/* and put redirecting index.jsp in the main path, but after sucessful login and redirection to /app/ I still get JS error mentioned above… I also tried to remove Servlet 3.0 API annotations (@WebServer) and only use a standard web.xml descriptor, but also no luck here :confused:

Any clues how to make it work?

Hello Otmar C.

I had the same issue in the recent past and it looks like we must set /VAADIN/* url pattern as public…

But honestly I’m not sure if it the correct way to fix it…

Please, see this wiki below. I hope it may help you…

https://vaadin.com/wiki/-/wiki/Main/Creating+Secure+Vaadin+Applications+using+JEE6/pop_up?_36_version=3.9