Unable to login using spring security

I am trying to customize spring security Login mechanism implemented in an existing spring mvc application. this is the entry from spring security xml file

<security:form-login login-page="/login" default-target-url="/my-account" always-use-
default-target="false" authentication-failure-handler-ref="failureHandler" 
authentication-success-handler-ref="successHandler" />

this was working fine since when ever user want to login he/she was being redirected to the login page who was having a URL like


as per new requirement we have to impalement one global Login panel which will be there throughout the application and user can Login from there, at same time there will be some cases when user trying to access a secure area will be redirected to Login page and in that case URL can be like


being new to spring security i am not sure how should i handle this use-case should i change the login-page="/login" to login-page="/*" any pointer in this regard will really be helpful


i saw following entry in my spring-security xml file

<bean id="mainAuthEntryPoint" class="org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint"
        <property name="loginFormUrl" value="/login" />
        <property name="forceHttps" value="true" />
        <property name="useForward" value="false" />

now it made me more confused as where all i need to change if any


From the comments, it sounds like you want an iframe or ajax authentication method.

This article may be a good starting point for you to look into:


Need Your Help

Div is showing with delay of 2-3 seconds on a CMS after height change, Is there alternative

javascript html css

I am trying to change an element's height as soon as possible after page loads, as it's third party CMS on which my code is running so I am not sure what could be done, this is what i have tried so...