I'm using Spring Security in my Spring Project. Following is my springSecurityConfiguration.xml File. After I try to log in by using correct credentials, the page redirects to 

> 
> <https://localhost:8443/j_spring_security_check>.
> 
> 
> 

Please note that it falls beyond my application which is terror movies. The custom\_login page is presented at 

> 
> <https://localhost:8443/terrormovies/custom_login>
> 
> 
> 

```
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:security="http://www.springframework.org/schema/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
    http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd">

<security:http auto-config="true" use-expressions="true">

    <security:expression-handler ref="expressionHandler" />

    <security:intercept-url pattern="/admin/*"
        access="hasIpAddress('127.0.0.1') 
        and (isAnonymous() ? false : principal.lastname== 'Scarioni') and over18" />

    <security:intercept-url pattern="/movies/**/*"
        access="hasRole('ROLE_USER')" />

    <security:intercept-url pattern="/movies/*"
        access="hasAnyRole('ROLE_USER','ROLE_VIP')" />

    <security:intercept-url pattern="/j_spring_security_switch_user"
        access="hasRole('ROLE_ADMIN')" />

    <security:intercept-url pattern="/j_spring_security_exit_user"
        access="hasRole('ROLE_ADMIN')" />

    <security:intercept-url pattern="/custom_login"
        requires-channel="https" />

    <security:intercept-url pattern="/j_spring_security_check"
        requires-channel="https" />
    <security:remember-me key="terror-key" />

    <security:logout delete-cookies="JSESSIONID"
        success-handler-ref="logoutRedirectToAny" />

    <security:custom-filter ref="switchUser"
        before="FILTER_SECURITY_INTERCEPTOR" />

    <security:form-login login-page="/custom_login"
        authentication-failure-handler-ref="serverErrorHandler"
        username-parameter="user_param" password-parameter="pass_param" />

    <security:session-management>
        <security:concurrency-control
            max-sessions="1" />
    </security:session-management>

</security:http>

<security:authentication-manager>
    <security:authentication-provider
        user-service-ref="inMemoryUserServiceWithCustomUser" />
</security:authentication-manager>

<bean id="switchUser"
    class="org.springframework.security.web.authentication.switchuser.SwitchUserFilter">
    <property name="userDetailsService" ref="inMemoryUserServiceWithCustomUser" />
    <property name="targetUrl" value="/" />

</bean>

<bean id="expressionHandler"
    class="com.apress.pss.terrormovies.security.CustomWebSecurityExpressionHandler" />

<bean id="inMemoryUserServiceWithCustomUser"
    class="com.apress.pss.terrormovies.spring.CustomInMemoryUserDetailsManager">

    <constructor-arg>

        <list>

            <bean class="com.apress.pss.terrormovies.model.User">

                <constructor-arg value="admin" />
                <constructor-arg value="admin" />

                <constructor-arg>

                    <list>

                        <bean
                            class="org.springframework.security.core.authority.SimpleGrantedAuthority">
                            <constructor-arg value="ROLE_ADMIN" />
                        </bean>

                    </list>

                </constructor-arg>

                <constructor-arg value="Scarioni" />
                <constructor-arg value="19" />

            </bean>

            <bean class="com.apress.pss.terrormovies.model.User">

                <constructor-arg value="paco" />
                <constructor-arg value="tous" />

                <constructor-arg>

                    <list>

                        <bean
                            class="org.springframework.security.core.authority.SimpleGrantedAuthority">
                            <constructor-arg value="ROLE_USER" />
                        </bean>

                    </list>

                </constructor-arg>

                <constructor-arg value="Miranda" />
                <constructor-arg value="20" />

            </bean>

            <bean class="com.apress.pss.terrormovies.model.User">

                <constructor-arg value="lucas" />
                <constructor-arg value="fernandez" />

                <constructor-arg>

                    <list>

                        <bean
                            class="org.springframework.security.core.authority.SimpleGrantedAuthority">
                            <constructor-arg value="ROLE_VIP" />
                        </bean>
                        <bean
                            class="org.springframework.security.core.authority.SimpleGrantedAuthority">
                            <constructor-arg value="ROLE_USER" />
                        </bean>

                    </list>

                </constructor-arg>

                <constructor-arg value="Silva" />
                <constructor-arg value="20" />

            </bean>

        </list>

    </constructor-arg>

</bean>

<bean id="logoutRedirectToAny"
    class="org.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler">
    <property name="targetUrlParameter" value="redirectTo" />
</bean>

<bean id="serverErrorHandler"
    class="com.apress.pss.terrormovies.security.ServerErrorFailureHandler" /></beans>

```