title: spring security 3.1- redirect to login page with context url
body: <p>I am using spring security3.1 with name space configuration. I want to redirect to login page if I enter the URL in browser up to the context path, instead of full URL of the login page.</p>
  
  <p>For example, <code>http://xxx:8080/context/</code> instead <code>http://xxx:8080/context/login.html</code></p>
  
  <p>I am able to display login page with complete URL <code>http://localhost:8080/context/login.html</code></p>
  
  <p>I have tried the following code:</p>
  
  <pre><code>&lt;http auto-config='true' authentication-manager-ref="authentication-manager" entry-point-ref="authenticationEntryPoint"&gt;
  
  &lt;beans:bean id="authenticationEntryPoint"      class="org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint"&gt;
   &lt;beans:property name="loginFormUrl" value="/login.html"/&gt;
   &lt;beans:property name="forceHttps" value="true"/&gt;
  &lt;/beans:bean&gt;
  
  
  ....
  </code></pre>
  
  <p>I added a <code>LoginUrlAuthenticationEntryPoint</code> entry in order to redirect to login page also but it seems not working.</p>