Hi Marten, and thank you again for your suggestions.
Yoy have mentioned the main key for my trouble.
Following your suggestions, I remove the login manual stuff in WebFlow, and do this (the file is brm-flow.xml):
HTML Code:
<flow xmlns="http://www.springframework.org/schema/webflow"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/webflow
http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd" start-state="pestanyas">
<view-state id="pestanyas" view="pestanyas">
<secured attributes="ROLE_ACCESS_PESTANYA"/>
<transition . . . />
<transition . . . />
. . .
SecurityFlowExecutionListener is also defined in webflow-config.xml:
HTML Code:
<bean id="securityFlowExecutionListener" class="org.springframework.webflow.security.SecurityFlowExecutionListener">
In security.xml, I do this:
HTML Code:
<http auto-config="false" entry-point-ref="authenticationProcessingFilterEntryPoint">
<intercept-url pattern="/WEB-INF/views/login.jsp" filters="none" />
<intercept-url pattern="/WEB-INF/views/pestanyas.jsp" access="ROLE_ACCESS_PESTANYA" />
...
...
My first view after login is "pestanyas" and I put the authority that logged user must have to get into that.
I have my login.jsp in /WEB-INF/views/login.jsp
"pestanyas" is in /WEB-INF/views/pestanyas.jsp
When I try to access the application, it goes directly yo "pestanyas", and cracks with NullPointerException.
All the URLs are http://.../brm-flow.do?execution=e1s1 and something like this.
Default welcome page "index.jsp" redirect to "brm-flow.do".
I think that this should work like this:
- Go to pestanyas
- Check permissions (ROLE_ACCESS_PESTANYA)
- If there is no permission, offer login view to get access
- Check permissions and start session with CustomAuthenticationManager and other SpringSecurity work
- Access
Is this right?
How can I force to make login? Is it right to put physical *.jsp in security XML file?
Thanks again. Best regards