one step foward. Found this URL very helpful
http://angelborroy.wordpress.com/200...the-user-role/
I actually have pretty basic settings working good as given below:
Code:
<security:global-method-security secured-annotations="enabled" />
<security:http auto-config="true">
<!-- Restrict URLs based on role -->
<security:intercept-url pattern="/publicpages/*" access="ROLE_ANONYMOUS" />
<security:intercept-url pattern="/index.jsp" access="ROLE_ANONYMOUS,ROLE_USER" />
<security:intercept-url pattern="/login.htm*" access="ROLE_ANONYMOUS,ROLE_USER" />
<security:intercept-url pattern="/*" access="ROLE_USER" />
<!-- Override default login and logout pages -->
<security:form-login login-page="/login.htm"
login-processing-url="/j_spring_security_check"
default-target-url="/welcome.htm"
authentication-failure-url="/login.htm?login_error=1" />
<security:logout logout-url="/logout" logout-success-url="/logoutSuccess.jsp" />
</security:http>
<security:authentication-provider>
<security:jdbc-user-service data-source-ref="dataSource" />
</security:authentication-provider>
</beans>
As user is fwarded to login page i get conrtol of actuall URL entered in spring controller. Is there a way to override the targetURL stored by spring security at this point. This way i dont' have to do anything with custom filters and security settings.