Hi all,
I use spring security with my vaadin’s application and I have problem with my login page. First I used simple login page which was write in jsp and works fine. Now I would like to use login page which will be write as vaadin app. I made another servlet 'Test’which is avaliable with ANNONYMOUS_ROLE
<servlet>
<servlet-name>Test</servlet-name>
<servlet-class>com.vaadin.terminal.gwt.server.ApplicationServlet</servlet-class>
<init-param>
<!-- Define our application class for servlet. -->
<param-name>application</param-name>
<param-value>com.login.LoginApp</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>Test</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
My main servlet:
<servlet>
<servlet-name>VaadinSpringServlet</servlet-name>
<servlet-class>pl.polsl.aei.dovecote.server.spring.SpringApplicationServlet</servlet-class>
<init-param>
<param-name>applicationBean</param-name>
<param-value>applicationBean</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>VaadinSpringServlet</servlet-name>
<url-pattern>/test/*</url-pattern>
</servlet-mapping>
My security xml:
<sec:http auto-config="true" access-denied-page="/login_error.jsp">
<sec:intercept-url pattern="/" access="ROLE_ANONYMOUS" />
<sec:intercept-url pattern="/jsp/login_error*" access="ROLE_ANONYMOUS" />
<sec:intercept-url pattern="/test/**" access="ROLE_USER" />
<sec:form-login login-processing-url="/j_spring_security_check" login-page="/" authentication-failure-url="/jsp/login_error" />
</sec:http>
When I go to page http://myapp/ I am redirect to ‘Test’ servlet and my login page appears. Now I try to make j_spring_security_check’s post request but I don’t know how can I do it. I try use RequestBuilder from GWT but it doesn’t work (I get UnsatisfiedLink error when a use URL.encode…)
Can someone help, any suggestion?