title: Spring security filters in web.xml giving 404 error. Not really understand why
body: <p>I am implementing spring security in my app, however I am getting a 404 error when I had the security filters in the web.xml. Do I need to add create any other files?  I read somewhere about adding a securityContext.xml but it still gives me the same error.
  Below is my web.xml: </p>
  
  <pre><code> &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"&gt;
  
    &lt;display-name&gt;Archetype Created Web Application&lt;/display-name&gt;
  
  
      &lt;!-- Le dispatcher de servlet de spring --&gt;
      &lt;servlet&gt;
          &lt;servlet-name&gt;TemptingPlacesMvc&lt;/servlet-name&gt;
          &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
              &lt;param-value&gt;
                  classpath:applicationContext.xml,
                  classpath:TemptingPlacesMvc-servlet.xml
              &lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
  
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;TemptingPlacesMvc&lt;/servlet-name&gt;
          &lt;url-pattern&gt;*.mvc&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  
      &lt;listener&gt;
          &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
      &lt;/listener&gt;
  
      &lt;context-param&gt;
          &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
          &lt;param-value&gt;classpath:application-context-webservice.xml,classpath:applicationContext.xml,
                  classpath:TemptingPlacesMvc-servlet.xml, 
                  &lt;!-- classpath:/WEB-INF/spring-security.xml --&gt;&lt;/param-value&gt;
      &lt;/context-param&gt;
  
       &lt;!-- Le dispatcher de servlet de cxf --&gt;
      &lt;servlet&gt;
          &lt;servlet-name&gt;CXFServlet&lt;/servlet-name&gt;
          &lt;servlet-class&gt;org.apache.cxf.transport.servlet.CXFServlet&lt;/servlet-class&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;contextConfigLocationCXf&lt;/param-name&gt;
              &lt;param-value&gt;
                  classpath:application-context-webservice.xml
              &lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;load-on-startup&gt;2&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
  
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;CXFServlet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/ws/*&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  
      &lt;!-- The Welcome File List --&gt;
      &lt;welcome-file-list&gt;
          &lt;welcome-file&gt;/login/login.mvc&lt;/welcome-file&gt;
      &lt;/welcome-file-list&gt;
  
      &lt;!--    Security Filter  --&gt;
      &lt;filter&gt;
          &lt;filter-name&gt;springSecurityFilterChain&lt;/filter-name&gt;
          &lt;filter-class&gt;org.springframework.web.filter.DelegatingFilterProxy&lt;/filter-class&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;spring-securit.xml&lt;/param-name&gt;
              &lt;param-value&gt;org.springframework.web.context.WebApplicationContext.ROOT
              &lt;/param-value&gt;
          &lt;/init-param&gt;
      &lt;/filter&gt;
      &lt;filter-mapping&gt;
          &lt;filter-name&gt;springSecurityFilterChain&lt;/filter-name&gt;
          &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
          &lt;dispatcher&gt;REQUEST&lt;/dispatcher&gt;
          &lt;dispatcher&gt;ERROR&lt;/dispatcher&gt;
      &lt;/filter-mapping&gt;
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p>spring-security.xml</p>
  
  <pre><code>&lt;beans:beans xmlns="http://www.springframework.org/schema/security"
  xmlns:beans="http://www.springframework.org/schema/beans" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  http://www.springframework.org/schema/security
  http://www.springframework.org/schema/security/spring-security-3.2.xsd"&gt;
  
  &lt;http auto-config="true"&gt;
      &lt;intercept-url pattern="/admin**" access="ROLE_USER" /&gt;
      &lt;form-login
          login-processing-url="/j_spring_security_check" 
          login-page="/login" 
          default-target-url="/welcome" 
          authentication-failure-url="/login?error" 
          username-parameter="username"
          password-parameter="password" /&gt;
      &lt;logout logout-success-url="/login?logout" /&gt;
      &lt;!-- enable csrf protection --&gt;
      &lt;csrf/&gt;
  &lt;/http&gt;
  
  &lt;authentication-manager&gt;
      &lt;authentication-provider&gt;
        &lt;user-service&gt;
          &lt;user name="user" password="1234" authorities="ROLE_USER" /&gt;
        &lt;/user-service&gt;
      &lt;/authentication-provider&gt;
  &lt;/authentication-manager&gt;
  </code></pre>
  
  <p></p>
  
  <p>securityContext.xml</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans:beans xmlns="http://www.springframework.org/schema/security"
      xmlns:beans="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
                          http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.xsd"&gt;
  
      &lt;beans:bean id="filterChainProxy" class="org.springframework.security.util.FilterChainProxy"&gt;
          &lt;filter-chain-map path-type="ant"&gt;
              &lt;filter-chain pattern="/**" filters="sif"/&gt;
          &lt;/filter-chain-map&gt;
      &lt;/beans:bean&gt;
  
      &lt;beans:bean id="sif"
          class="org.springframework.security.context.HttpSessionContextIntegrationFilter" /&gt;
  
  &lt;/beans:beans&gt;
  </code></pre>
  
  <p>Error message:</p>
  
  <pre><code>org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [WEB-INF/spring-security.xml]; nested exception is java.io.FileNotFoundException: class path resource [WEB-INF/spring-security.xml] cannot be opened because it does not exist
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
      at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125) ~[spring-web-3.2.13.RELEASE.jar:3.2.13.RELEASE]
      at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94) ~[spring-web-3.2.13.RELEASE.jar:3.2.13.RELEASE]
      at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130) ~[spring-context-3.2.13.RELEASE.jar:3.2.13.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:539) ~[spring-context-3.2.13.RELEASE.jar:3.2.13.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451) ~[spring-context-3.2.13.RELEASE.jar:3.2.13.RELEASE]
      at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410) ~[spring-web-3.2.13.RELEASE.jar:3.2.13.RELEASE]
      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) ~[spring-web-3.2.13.RELEASE.jar:3.2.13.RELEASE]
      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) [spring-web-3.2.13.RELEASE.jar:3.2.13.RELEASE]
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4887) [catalina.jar:7.0.39]
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5381) [catalina.jar:7.0.39]
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:7.0.39]
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) [catalina.jar:7.0.39]
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) [catalina.jar:7.0.39]
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [na:1.7.0_17]
      at java.util.concurrent.FutureTask.run(FutureTask.java:166) [na:1.7.0_17]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_17]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_17]
      at java.lang.Thread.run(Thread.java:722) [na:1.7.0_17]
  Caused by: java.io.FileNotFoundException: class path resource [WEB-INF/spring-security.xml] cannot be opened because it does not exist
      at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:172) ~[spring-core-4.2.0.RELEASE.jar:4.2.0.RELEASE]
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:329) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
      ... 22 common frames omitted
  Sep 11, 2015 1:43:09 PM org.apache.catalina.core.StandardContext listenerStart
  SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
  org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [WEB-INF/spring-security.xml]; nested exception is java.io.FileNotFoundException: class path resource [WEB-INF/spring-security.xml] cannot be opened because it does not exist
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)
      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)
      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
      at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)
      at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
      at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
      at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:539)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451)
      at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4887)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5381)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:722)
  Caused by: java.io.FileNotFoundException: class path resource [WEB-INF/spring-security.xml] cannot be opened because it does not exist
      at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:172)
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:329)
      ... 22 more
  
  Sep 11, 2015 1:43:09 PM org.apache.catalina.core.StandardContext startInternal
  SEVERE: Error listenerStart
  Sep 11, 2015 1:43:09 PM org.apache.catalina.core.StandardContext startInternal
  SEVERE: Context [/temptingplaces-web] startup failed due to previous errors
  Sep 11, 2015 1:43:09 PM org.apache.catalina.core.ApplicationContext log
  INFO: Closing Spring root WebApplicationContext
  13:43:09.755 [localhost-startStop-1] INFO  o.s.w.c.s.XmlWebApplicationContext - Closing Root WebApplicationContext: startup date [Fri Sep 11 13:43:07 MUT 2015]; root of context hierarchy
  13:43:09.825 [localhost-startStop-1] WARN  o.s.w.c.s.XmlWebApplicationContext - Exception thrown from ApplicationListener handling ContextClosedEvent
  java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: Root WebApplicationContext: startup date [Fri Sep 11 13:43:07 MUT 2015]; root of context hierarchy
      at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:347) [spring-context-3.2.13.RELEASE.jar:3.2.13.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334) [spring-context-3.2.13.RELEASE.jar:3.2.13.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1051) [spring-context-3.2.13.RELEASE.jar:3.2.13.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1012) [spring-context-3.2.13.RELEASE.jar:3.2.13.RELEASE]
      at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:586) [spring-web-3.2.13.RELEASE.jar:3.2.13.RELEASE]
      at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:143) [spring-web-3.2.13.RELEASE.jar:3.2.13.RELEASE]
      at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4927) [catalina.jar:7.0.39]
      at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5573) [catalina.jar:7.0.39]
      at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232) [catalina.jar:7.0.39]
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160) [catalina.jar:7.0.39]
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) [catalina.jar:7.0.39]
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) [catalina.jar:7.0.39]
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [na:1.7.0_17]
      at java.util.concurrent.FutureTask.run(FutureTask.java:166) [na:1.7.0_17]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_17]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_17]
      at java.lang.Thread.run(Thread.java:722) [na:1.7.0_17]
  13:43:09.826 [localhost-startStop-1] WARN  o.s.w.c.s.XmlWebApplicationContext - Exception thrown from LifecycleProcessor on context close
  java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: Root WebApplicationContext: startup date [Fri Sep 11 13:43:07 MUT 2015]; root of context hierarchy
      at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:360) [spring-context-3.2.13.RELEASE.jar:3.2.13.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1059) [spring-context-3.2.13.RELEASE.jar:3.2.13.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1012) [spring-context-3.2.13.RELEASE.jar:3.2.13.RELEASE]
      at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:586) [spring-web-3.2.13.RELEASE.jar:3.2.13.RELEASE]
      at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:143) [spring-web-3.2.13.RELEASE.jar:3.2.13.RELEASE]
      at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4927) [catalina.jar:7.0.39]
      at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5573) [catalina.jar:7.0.39]
      at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232) [catalina.jar:7.0.39]
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160) [catalina.jar:7.0.39]
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) [catalina.jar:7.0.39]
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) [catalina.jar:7.0.39]
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [na:1.7.0_17]
      at java.util.concurrent.FutureTask.run(FutureTask.java:166) [na:1.7.0_17]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_17]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_17]
      at java.lang.Thread.run(Thread.java:722) [na:1.7.0_17]
  Sep 11, 2015 1:43:09 PM org.apache.catalina.core.StandardContext listenerStop
  SEVERE: Exception sending context destroyed event to listener instance of class org.springframework.web.context.ContextLoaderListener
  java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext
      at org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:171)
      at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1092)
      at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1066)
      at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1012)
      at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:586)
      at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:143)
      at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4927)
      at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5573)
      at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:722)
  </code></pre>
  
  <p>login.jsp:</p>
  
  <pre><code>     &lt;%@page contentType="text/html" pageEncoding="UTF-8"%&gt;
  &lt;%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%&gt;
  &lt;%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %&gt;
  &lt;%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%&gt;
  &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
     "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html id="login"&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
  &lt;title&gt;&lt;spring:message code="login.title" /&gt;&lt;/title&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  
      &lt;div class="container spaceless"&gt;                                       
          &lt;form name='loginForm' action="&lt;c:url value='/j_spring_security_check' /&gt;" method='POST'&gt;
              &lt;table id="albums" cellspacing="0px" style="width: 100%;"&gt;                      
                  &lt;tr&gt;
                      &lt;td width="32%"  align="right" style="padding-right:13px;"&gt;&lt;spring:message code="login.email" /&gt;&lt;/td&gt;
                      &lt;td style="padding-right: 22px;"&gt;&lt;input type="text" name="j_username" size="29" style="width: 100%;"&gt;&lt;/td&gt;
                  &lt;/tr&gt;       
  
                                              &lt;tr class="spaceUnderLess"&gt;
                                                  &lt;td width="32%" align="right" style="padding-right:13px;"&gt;&lt;spring:message code="login.password" /&gt;&lt;/td&gt;
                                                  &lt;td style="padding-right: 22px;"&gt;&lt;input type="password" name="j_password" size="29" style="width: 100%;"&gt;&lt;/td&gt;
                                              &lt;/tr&gt;
  
                                              &lt;tr class="spaceUnderLess" &gt;
                                                  &lt;td width="32%" &gt;&lt;/td&gt;
                                                  &lt;td&gt;
                                                      &lt;input type="checkbox" name="checkbox" id="checkbox_id" value="value"&gt;
                                                      &lt;label for="checkbox_id"&gt;&lt;spring:message code="login.remember" /&gt;&lt;/label&gt;
                                                  &lt;/td&gt;
                                              &lt;/tr&gt;   
  
                                              &lt;tr class="spaceUnderLess" &gt;
                                                  &lt;td colspan="2" align="right" style="padding-right: 19px;"&gt;
                                                      &lt;span style="padding-right:13px;" class="colorText"&gt;&lt;spring:message code="login.forget.password" /&gt;&lt;/span&gt;
                                                      &lt;button  class="btn btn-primary dropdown-toggle" type="submit" style="width:120px;"&gt;&lt;spring:message code="login.btn.access" /&gt;&lt;/button&gt;
                                                  &lt;/td&gt;                       
                                              &lt;/tr&gt;                   
                                          &lt;/table&gt;
                                      &lt;/form&gt;
      &lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>