title: HTTP Status 405 - Request method 'POST' not supported . Technology Used . Spring MVC and Spring security
body: <p>I am using Spring MVC (4.0.0.RELEASE) and Spring Security (3.2.4.RELEASE).</p>
  
  <p>When i am trying to submit a page i am getting "HTTP Status 405 - Request method 'POST' not supported ." Error.</p>
  
  <p><strong><code>web.xml</code></strong></p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app 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_3_0.xsd"
      version="3.0"&gt;
    &lt;display-name&gt;ProAccounting&lt;/display-name&gt;
  
  
    &lt;servlet&gt;
          &lt;servlet-name&gt;proaccounting&lt;/servlet-name&gt;
          &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
  
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;proaccounting&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/&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;
              /WEB-INF/spring-security.xml,
               /WEB-INF/DataSource.xml
          &lt;/param-value&gt;
      &lt;/context-param&gt;
      &lt;!-- Spring Security --&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;/filter&gt;
  
      &lt;filter-mapping&gt;
          &lt;filter-name&gt;springSecurityFilterChain&lt;/filter-name&gt;
          &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
      &lt;/filter-mapping&gt;
  
  
      &lt;servlet-mapping&gt;
        &lt;servlet-name&gt;default&lt;/servlet-name&gt;
        &lt;url-pattern&gt;*.css&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  
       &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;default&lt;/servlet-name&gt;
          &lt;url-pattern&gt;*.js&lt;/url-pattern&gt;
       &lt;/servlet-mapping&gt;
  
      &lt;welcome-file-list&gt;
          &lt;welcome-file&gt;index.html&lt;/welcome-file&gt;
          &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
          &lt;welcome-file&gt;Login.jsp&lt;/welcome-file&gt;
      &lt;/welcome-file-list&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p><strong>proaccounting-servlet.xml</strong> </p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
      xmlns:context="http://www.springframework.org/schema/context"
      xmlns:oxm="http://www.springframework.org/schema/oxm"
      xmlns:mvc="http://www.springframework.org/schema/mvc" 
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
                  http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
                  http://www.springframework.org/schema/oxm http://www.springframework.org/schema/oxm/spring-oxm-3.0.xsd  http://www.springframework.org/schema/mvc
           http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"&gt;
  
  
      &lt;context:component-scan base-package="com.pro94tek.*" /&gt;
      &lt;context:annotation-config/&gt;
      &lt;mvc:annotation-driven /&gt;
      &lt;mvc:default-servlet-handler/&gt;
      &lt;bean class="org.springframework.web.servlet.view.BeanNameViewResolver" /&gt;
  
      &lt;!-- To enable @RequestMapping process on type level and method level --&gt;
      &lt;bean class="org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter"&gt;&lt;/bean&gt;
  
      &lt;bean class="org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter"&gt;&lt;/bean&gt;
      &lt;bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping" /&gt;
      &lt;bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"&gt;
          &lt;property name="messageConverters"&gt;
              &lt;list&gt;
                  &lt;!-- ref bean="marshallingConverter" /--&gt;
                  &lt;ref bean="atomConverter"  /&gt;
                  &lt;ref bean="jsonConverter" /&gt;
                   &lt;bean class="org.springframework.http.converter.StringHttpMessageConverter"/&gt;
                  &lt;bean class="org.springframework.http.converter.FormHttpMessageConverter"/&gt;
                  &lt;bean class="org.springframework.http.converter.ByteArrayHttpMessageConverter" /&gt;
                  &lt;bean class="org.springframework.http.converter.xml.SourceHttpMessageConverter"/&gt;
                  &lt;bean class="org.springframework.http.converter.BufferedImageHttpMessageConverter"/&gt;
              &lt;/list&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  
      &lt;!-- bean id="marshallingConverter" class="org.springframework.http.converter.xml.MarshallingHttpMessageConverter"&gt;
          &lt;constructor-arg ref="jaxbMarshaller" /&gt;
          &lt;property name="supportedMediaTypes" value="application/xml"/&gt;
      &lt;/bean--&gt;
  
      &lt;bean id="atomConverter" class="org.springframework.http.converter.feed.AtomFeedHttpMessageConverter"&gt;
          &lt;property name="supportedMediaTypes" value="application/atom+xml" /&gt;
      &lt;/bean&gt;
  
      &lt;bean id="jsonConverter" class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter"&gt;
          &lt;property name="supportedMediaTypes" value="application/json" /&gt;
      &lt;/bean&gt;
  
  
   &lt;bean id="sessionFactory"
          class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"&gt;
          &lt;property name="dataSource" ref="dataSource" /&gt;
  
          &lt;!-- property name="annotatedClasses"&gt;
              &lt;list&gt;
                  &lt;value&gt;com.sai.tfms.entity.SaiAgroUserEntity&lt;/value&gt;
                  &lt;value&gt;com.sai.tfms.entity.TFMAccountEntity&lt;/value&gt;
              &lt;/list&gt;
          &lt;/property--&gt;
  
          &lt;property name="hibernateProperties"&gt;
              &lt;props&gt;
                  &lt;prop key="hibernate.dialect"&gt;org.hibernate.dialect.PostgreSQLDialect&lt;/prop&gt;
                  &lt;prop key="cache.provider_class"&gt;org.hibernate.cache.HashtableCacheProvider&lt;/prop&gt;
                  &lt;prop key="transaction.factory_class"&gt;org.hibernate.transaction.JDBCTransactionFactory&lt;/prop&gt;
                  &lt;prop key="current_session_context_class"&gt;thread&lt;/prop&gt;
                  &lt;prop key="hibernate.show_sql"&gt;true&lt;/prop&gt;
                  &lt;prop key="format_sql"&gt;true&lt;/prop&gt;
                  &lt;prop key="use_sql_comments"&gt;true&lt;/prop&gt;
              &lt;/props&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  
          &lt;bean id="transactionManager" class="org.springframework.orm.hibernate4.HibernateTransactionManager"&gt;
               &lt;property name="sessionFactory" ref="sessionFactory"/&gt;
          &lt;/bean&gt;
  
  
      &lt;bean id="dataSource" 
               class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
          &lt;property name="driverClassName" value="org.postgresql.Driver" /&gt;
          &lt;property name="url" value="jdbc:postgresql://localhost:5432/proaccounting" /&gt;
          &lt;property name="username" value="postgres" /&gt;
          &lt;property name="password" value="postgres" /&gt;
      &lt;/bean&gt;
  
  
      &lt;bean id="examXmlView"
          class="org.springframework.web.servlet.view.xml.MarshallingView"&gt;
          &lt;constructor-arg&gt;
              &lt;bean class="org.springframework.oxm.xstream.XStreamMarshaller"&gt;
                  &lt;property name="autodetectAnnotations" value="true"/&gt;
              &lt;/bean&gt;
          &lt;/constructor-arg&gt;
      &lt;/bean&gt;
  
       &lt;!-- bean id="viewResolver"
          class="org.springframework.web.servlet.view.UrlBasedViewResolver"&gt;
          &lt;property name="viewClass"
              value="org.springframework.web.servlet.view.JstlView" /&gt;
          &lt;property name="prefix" value="/" /&gt;
          &lt;property name="suffix" value=".jsp" /&gt;
      &lt;/bean--&gt;
  
      &lt;mvc:resources location="/assets/" mapping="/assets/**" /&gt;
  
      &lt;bean
          class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
          &lt;property name="prefix"&gt;
              &lt;value&gt;/WEB-INF/pages/&lt;/value&gt;
          &lt;/property&gt;
          &lt;property name="suffix"&gt;
              &lt;value&gt;.jsp&lt;/value&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p><strong>spring-security.xml</strong></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;!-- enable use-expressions --&gt;
      &lt;http auto-config="true" use-expressions="true"&gt;
  
          &lt;intercept-url pattern="/admin**" access="hasRole('ROLE_ADMIN')" /&gt;
          &lt;intercept-url pattern="/companyRegister**" access="hasRole('ROLE_ADMIN')" /&gt;
           &lt;intercept-url pattern="/company/**" access="isAuthenticated()" /&gt;
          &lt;!-- access denied page --&gt;
          &lt;access-denied-handler error-page="/403" /&gt;
  
          &lt;form-login 
              login-page="/index" 
              default-target-url="/welcome" 
              authentication-failure-url="/index?error" 
              username-parameter="username"
              password-parameter="password" /&gt;
          &lt;logout logout-success-url="/index?logout"  /&gt;
          &lt;!-- enable csrf protection --&gt;
          &lt;csrf/&gt;
      &lt;/http&gt;
  
      &lt;!-- Select users and user_roles from database --&gt;
      &lt;authentication-manager&gt;
        &lt;authentication-provider&gt;
          &lt;jdbc-user-service data-source-ref="dataSource"
            users-by-username-query=
              "select userid,password, enabled from proaccounting.pro_login_user where userid=?"
            authorities-by-username-query=
              "select username, role from proaccounting.user_roles where username =?  " /&gt;
        &lt;/authentication-provider&gt;
      &lt;/authentication-manager&gt;
  
  &lt;/beans:beans&gt;
  </code></pre>
  
  <p><strong>companybasicinfo.jsp This is the jsp from which i am trying to submit the page.</strong></p>
  
  <pre><code>    &lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
      pageEncoding="ISO-8859-1"%&gt;
  &lt;%@ taglib prefix="pro" uri="http://www.springframework.org/tags/form"%&gt;
  &lt;%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;!-- Meta --&gt;
  &lt;meta charset="utf-8"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
      &lt;meta name="description" content=""&gt;
      &lt;meta name="author" content=""&gt;
  
      &lt;!-- Favicon --&gt;
      &lt;link rel="shortcut icon" href="favicon.ico"&gt;
  
      &lt;!-- CSS Global Compulsory --&gt;
      &lt;link rel="stylesheet" href="assets/plugins/bootstrap/css/bootstrap.min.css"&gt;
      &lt;link rel="stylesheet" href="assets/css/style.css"&gt;
  
      &lt;!-- CSS Implementing Plugins --&gt;
      &lt;link rel="stylesheet" href="assets/plugins/line-icons/line-icons.css"&gt;
      &lt;link rel="stylesheet" href="assets/plugins/font-awesome/css/font-awesome.min.css"&gt;
      &lt;link rel="stylesheet" href="assets/plugins/sky-forms/version-2.0.1/css/custom-sky-forms.css"&gt;
      &lt;!--[if lt IE 9]&gt;
          &lt;link rel="stylesheet" href="assets/plugins/sky-forms/version-2.0.1/css/sky-forms-ie8.css"&gt;
      &lt;![endif]--&gt;
      &lt;!-- HTML5 shim, for IE6-8 support of HTML5 elements --&gt;
      &lt;!--[if lt IE 9]&gt;
          &lt;script src="http://html5shim.googlecode.com/svn/trunk/html5.js"&gt;&lt;/script&gt;
      &lt;![endif]--&gt;
  
      &lt;!-- CSS Theme --&gt;    
      &lt;link rel="stylesheet" href="assets/css/themes/default.css" id="style_color"&gt;
  
      &lt;!-- CSS Customization --&gt;
      &lt;link rel="stylesheet" href="assets/css/custom.css"&gt;
  &lt;/head&gt; 
  &lt;body&gt;
  &lt;h1&gt;Message : ${message}&lt;/h1&gt;
   &lt;div class="container content"&gt;  
   &lt;div class="panel panel-sea"&gt;
   &lt;div class="panel-heading"&gt;
      &lt;h3 class="panel-title"&gt;&lt;i class="fa fa-tasks"&gt;&lt;/i&gt;Company Details&lt;/h3&gt;
  &lt;/div&gt;
   &lt;div class="panel-body"&gt;
  
      &lt;pro:form   action="${pageContext.request.contextPath}/companyRegister"  commandName="company" method="POST" enctype="multipart/form-data" id="sky-form1" class="sky-form"&gt;
      &lt;div class="col-md-6"&gt;
      &lt;header&gt;Trade Details&lt;/header&gt;
      &lt;fieldset&gt;                  
            &lt;div class="row"&gt;
                &lt;section class="col col-6"&gt;
                    &lt;label class="input"&gt;
  
                        &lt;pro:input type="text" path="legalName" placeholder="Company Legal Name"/&gt;
                        &lt;p class="note note-error"&gt;&lt;pro:errors path="legalName"/&gt;&lt;/p&gt;
                    &lt;/label&gt;
                &lt;/section&gt;
                &lt;section class="col col-6"&gt;
                    &lt;label class="input"&gt;
  
                        &lt;pro:input type="text" path="companyName" placeholder="Company Display Name"/&gt;
                        &lt;p class="note note-error"&gt;&lt;pro:errors path="companyName"/&gt;&lt;/p&gt;
                    &lt;/label&gt;
                &lt;/section&gt;
            &lt;/div&gt;
            &lt;div class="row"&gt;
                &lt;section class="col col-6"&gt;
                      &lt;label class="select"&gt;
                              &lt;pro:select path="lineofBusiness"&gt;
                                  &lt;option value="none" selected disabled&gt;Line of Business&lt;/option&gt;
                                  &lt;option value="design"&gt;Retails&lt;/option&gt;
                                  &lt;option value="development"&gt;Manufacturer&lt;/option&gt;
                                  &lt;option value="illustration"&gt;Accounting&lt;/option&gt;
                                  &lt;option value="branding"&gt;Software&lt;/option&gt;
                              &lt;/pro:select&gt;
                        &lt;i&gt;&lt;p class="note note-error"&gt;&lt;pro:errors path="lineofBusiness"/&gt;&lt;/p&gt;
                              &lt;/i&gt;
                       &lt;/label&gt;
                &lt;/section&gt;
                &lt;section class="col col-6"&gt;
                    &lt;label class="select"&gt;
                              &lt;pro:select path="organizationType"&gt;
                                  &lt;option value="none" selected disabled&gt;Organization Type&lt;/option&gt;
                                  &lt;option value="design"&gt;Retails&lt;/option&gt;
                                  &lt;option value="development"&gt;Manufacturer&lt;/option&gt;
                                  &lt;option value="illustration"&gt;Accounting&lt;/option&gt;
                                  &lt;option value="branding"&gt;Software&lt;/option&gt;
                              &lt;/pro:select&gt;
                               &lt;i&gt;&lt;p class="note note-error"&gt;&lt;pro:errors path="organizationType"/&gt;&lt;/p&gt;
                              &lt;/i&gt;
                       &lt;/label&gt;
                &lt;/section&gt;
            &lt;/div&gt;          
            &lt;div class="row"&gt;
                &lt;section class="col col-6"&gt;
                    &lt;label class="textarea"&gt;
                         &lt;textarea rows="3" name="comment" placeholder="Organization Description"&gt;&lt;/textarea&gt;
                     &lt;/label&gt;
                &lt;/section&gt;
                &lt;section class="col col-6"&gt;
                    &lt;label for="file" class="input input-file"&gt;
                         &lt;div class="button"&gt;&lt;input type="file" name="file" multiple onchange="this.parentNode.nextSibling.value = this.value"&gt;Browse&lt;/div&gt;&lt;input type="text" placeholder="Company Logo" readonly&gt;
                     &lt;/label&gt;
                &lt;/section&gt;
            &lt;/div&gt;                    
        &lt;/fieldset&gt;  
       &lt;/div&gt;
      &lt;div class="col-md-6"&gt;
  &lt;header&gt;Registered Office Address&lt;/header&gt;
      &lt;fieldset&gt;                  
            &lt;div class="row"&gt;
                &lt;section class="col col-6"&gt;
                    &lt;label class="textarea"&gt;
                         &lt;textarea rows="3" name="addressline1" placeholder="Address Line 1"&gt;&lt;/textarea&gt;
                     &lt;/label&gt;
                &lt;/section&gt;
                &lt;section class="col col-6"&gt;
                    &lt;label class="textarea"&gt;
                         &lt;textarea rows="3" name="addressline2" placeholder="Address Line 2"&gt;&lt;/textarea&gt;
                     &lt;/label&gt;
                &lt;/section&gt;
            &lt;/div&gt;
            &lt;div class="row"&gt;
                &lt;section class="col col-6"&gt;
                      &lt;label class="select"&gt;
                              &lt;select name="state"&gt;
                                  &lt;option value="none" selected disabled&gt;State&lt;/option&gt;
                                  &lt;option value="design"&gt;Andhra Pradesh&lt;/option&gt;
                                  &lt;option value="development"&gt;Arunachal&lt;/option&gt;
                                  &lt;option value="illustration"&gt;Karnatka&lt;/option&gt;
                                  &lt;option value="branding"&gt;Tamilnadu&lt;/option&gt;
                              &lt;/select&gt;
                              &lt;i&gt;&lt;/i&gt;
                       &lt;/label&gt;
                &lt;/section&gt;
                &lt;section class="col col-6"&gt;
                    &lt;label class="select"&gt;
                              &lt;select name="district"&gt;
                                  &lt;option value="none" selected disabled&gt;District&lt;/option&gt;
                                  &lt;option value="design"&gt;District 1&lt;/option&gt;
                                  &lt;option value="design"&gt;District 2&lt;/option&gt;
                                  &lt;option value="design"&gt;District 3&lt;/option&gt;
                                  &lt;option value="design"&gt;District 4&lt;/option&gt;
                              &lt;/select&gt;
                              &lt;i&gt;&lt;/i&gt;
                       &lt;/label&gt;
                &lt;/section&gt;
            &lt;/div&gt;          
            &lt;div class="row"&gt;
                &lt;section class="col col-6"&gt;
                      &lt;label class="select"&gt;
                              &lt;select name="city"&gt;
                                  &lt;option value="none" selected disabled&gt;City&lt;/option&gt;
                                  &lt;option value="design"&gt;City 1&lt;/option&gt;
                                  &lt;option value="design"&gt;City 2&lt;/option&gt;
                                  &lt;option value="design"&gt;City 3&lt;/option&gt;
                                  &lt;option value="design"&gt;City 4&lt;/option&gt;
                              &lt;/select&gt;
                              &lt;i&gt;&lt;/i&gt;
                       &lt;/label&gt;
                &lt;/section&gt;
                &lt;section class="col col-6"&gt;
                    &lt;label class="input"&gt;
                        &lt;input type="text" name="zipcode" placeholder="Zip Code"&gt;
                    &lt;/label&gt;
                &lt;/section&gt;
            &lt;/div&gt;  
            &lt;div class="row"&gt;
                &lt;section class="col col-6"&gt;
                    &lt;label class="input"&gt;
                        &lt;input type="text" name="phonenumber" placeholder="Phone Number"&gt;
                    &lt;/label&gt;
                &lt;/section&gt;
                &lt;section class="col col-6"&gt;
                    &lt;label class="input"&gt;
  
                        &lt;input type="text" name="fax" placeholder="Fax"&gt;
                    &lt;/label&gt;
                &lt;/section&gt;
            &lt;/div&gt; 
        &lt;/fieldset&gt;
        &lt;/div&gt;
      &lt;div class="col-md-7"&gt;
  &lt;header&gt;Postal Address&lt;/header&gt;
  
      &lt;fieldset&gt; 
  
            &lt;div class="row"&gt;
                &lt;section class="col col-6"&gt;
                   &lt;label class="checkbox"&gt;&lt;input type="checkbox" name="sameaddress" checked&gt;&lt;i&gt;&lt;/i&gt;Same as Registered Office&lt;/label&gt;
                &lt;/section&gt;
  
            &lt;/div&gt;
  
            &lt;div class="row"&gt;
                &lt;section class="col col-6"&gt;
                    &lt;label class="textarea"&gt;
                         &lt;textarea rows="3" name="paddressline1" placeholder="Address Line 1"&gt;&lt;/textarea&gt;
                     &lt;/label&gt;
                &lt;/section&gt;
                &lt;section class="col col-6"&gt;
                    &lt;label class="textarea"&gt;
                         &lt;textarea rows="3" name="paddressline2" placeholder="Address Line 2"&gt;&lt;/textarea&gt;
                     &lt;/label&gt;
                &lt;/section&gt;
            &lt;/div&gt;
            &lt;div class="row"&gt;
                &lt;section class="col col-6"&gt;
                      &lt;label class="select"&gt;
                              &lt;select name="pstate"&gt;
                                  &lt;option value="none" selected disabled&gt;State&lt;/option&gt;
                                  &lt;option value="design"&gt;Andhra Pradesh&lt;/option&gt;
                                  &lt;option value="development"&gt;Arunachal&lt;/option&gt;
                                  &lt;option value="illustration"&gt;Karnatka&lt;/option&gt;
                                  &lt;option value="branding"&gt;Tamilnadu&lt;/option&gt;
                              &lt;/select&gt;
                              &lt;i&gt;&lt;/i&gt;
                       &lt;/label&gt;
                &lt;/section&gt;
                &lt;section class="col col-6"&gt;
                    &lt;label class="select"&gt;
                              &lt;select name="pdistrict"&gt;
                                  &lt;option value="none" selected disabled&gt;District&lt;/option&gt;
                                  &lt;option value="design"&gt;District 1&lt;/option&gt;
                                  &lt;option value="design"&gt;District 2&lt;/option&gt;
                                  &lt;option value="design"&gt;District 3&lt;/option&gt;
                                  &lt;option value="design"&gt;District 4&lt;/option&gt;
                              &lt;/select&gt;
                              &lt;i&gt;&lt;/i&gt;
                       &lt;/label&gt;
                &lt;/section&gt;
            &lt;/div&gt;          
            &lt;div class="row"&gt;
                &lt;section class="col col-6"&gt;
                      &lt;label class="select"&gt;
                              &lt;select name="pcity"&gt;
                                  &lt;option value="none" selected disabled&gt;City&lt;/option&gt;
                                  &lt;option value="design"&gt;City 1&lt;/option&gt;
                                  &lt;option value="design"&gt;City 2&lt;/option&gt;
                                  &lt;option value="design"&gt;City 3&lt;/option&gt;
                                  &lt;option value="design"&gt;City 4&lt;/option&gt;
                              &lt;/select&gt;
                              &lt;i&gt;&lt;/i&gt;
                       &lt;/label&gt;
                &lt;/section&gt;
                &lt;section class="col col-6"&gt;
                    &lt;label class="input"&gt;
                        &lt;input type="text" name="pzipcode" placeholder="Zip Code"&gt;
                    &lt;/label&gt;
                &lt;/section&gt;
            &lt;/div&gt;  
            &lt;div class="row"&gt;
                &lt;section class="col col-6"&gt;
                    &lt;label class="input"&gt;
                        &lt;input type="text" name="pphonenumber" placeholder="Phone Number"&gt;
                    &lt;/label&gt;
                &lt;/section&gt;
                &lt;section class="col col-6"&gt;
                    &lt;label class="input"&gt;
  
                        &lt;input type="text" name="pfax" placeholder="Fax"&gt;
                    &lt;/label&gt;
                &lt;/section&gt;
            &lt;/div&gt; 
        &lt;/fieldset&gt;
        &lt;/div&gt;
  &lt;div class="col-md-5"&gt;
   &lt;fieldset&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;
       &lt;footer&gt;
       &lt;c:if test="${not empty error}"&gt;
              &lt;div class="error"&gt;${error}&lt;/div&gt;
      &lt;/c:if&gt;
      &lt;c:if test="${not empty msg}"&gt;
          &lt;div class="error"&gt;${msg}&lt;/div&gt;
      &lt;/c:if&gt;
      &lt;input type="submit" class="btn-u" value="Add Company"/&gt;
                                      &lt;button type="button" class="btn-u btn-u-default" onclick="window.history.back();"&gt;Back&lt;/button&gt;
                          &lt;/footer&gt;
    &lt;/fieldset&gt;
  &lt;/div&gt;
        &lt;/pro:form&gt;
  &lt;/div&gt; 
   &lt;/div&gt;
  &lt;/div&gt; 
   &lt;script type="text/javascript" src="assets/plugins/jquery-1.10.2.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="assets/plugins/jquery-migrate-1.2.1.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="assets/plugins/bootstrap/js/bootstrap.min.js"&gt;&lt;/script&gt; 
  &lt;!-- JS Implementing Plugins --&gt;
  &lt;script type="text/javascript" src="assets/plugins/back-to-top.js"&gt;&lt;/script&gt;
  &lt;!-- Checkout Form --&gt;
  &lt;script src="assets/plugins/sky-forms/version-2.0.1/js/jquery.validate.min.js"&gt;&lt;/script&gt;
  &lt;script src="assets/plugins/sky-forms/version-2.0.1/js/jquery.maskedinput.min.js"&gt;&lt;/script&gt;
  &lt;!-- Order Form --&gt;
  &lt;script src="assets/plugins/sky-forms/version-2.0.1/js/jquery-ui.min.js"&gt;&lt;/script&gt;
  &lt;script src="assets/plugins/sky-forms/version-2.0.1/js/jquery.form.min.js"&gt;&lt;/script&gt;
  
  &lt;!--[if lt IE 9]&gt;
      &lt;script src="assets/plugins/respond.js"&gt;&lt;/script&gt;
      &lt;script src="assets/plugins/html5shiv.js"&gt;&lt;/script&gt;
      &lt;script src="http://html5shim.googlecode.com/svn/trunk/html5.js"&gt;&lt;/script&gt;
      &lt;script src="assets/plugins/sky-forms/version-2.0.1/js/sky-forms-ie8.js"&gt;&lt;/script&gt;
  &lt;![endif]--&gt;
  
  &lt;!--[if lt IE 10]&gt;
      &lt;script src="assets/plugins/sky-forms/version-2.0.1/js/jquery.placeholder.min.js"&gt;&lt;/script&gt;
  &lt;![endif]--&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>CompanyController.java. Corresponding Controller.</strong></p>
  
  <pre><code>    package com.pro94tek.proaccounting.controller;
  
  import java.util.Map;
  
  import javax.validation.Valid;
  
  import org.springframework.security.access.prepost.PostAuthorize;
  import org.springframework.stereotype.Controller;
  import org.springframework.ui.Model;
  import org.springframework.validation.BindingResult;
  import org.springframework.web.bind.annotation.ModelAttribute;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestMethod;
  import org.springframework.web.servlet.ModelAndView;
  
  import com.pro94tek.proaccounting.modal.Company;
  
  
  
  @Controller
  public class CompanyController {
  
  
          @ModelAttribute("company")
          public Company getLoginForm() {
              return new Company();
          }
  
  
      @RequestMapping(value = { "/companybasicinfo"}, method = RequestMethod.GET)
      public ModelAndView defaultPage() {
  
        ModelAndView model = new ModelAndView();
        model.addObject("title", "Spring Security Login Form - Database Authentication");
        model.addObject("message", "This is Company page!");
        model.setViewName("company/companybasicinfo");
  
        return model;
  
      }
  
      @PostAuthorize(value = "")
      @RequestMapping(value = "/companyRegister", method = RequestMethod.POST)
      public ModelAndView registerCompany( @Valid Company company,
                          BindingResult result) {
  
        ModelAndView modelView = new ModelAndView();
        try{
                modelView.addObject("msg","Company Registered Successfully");
                if(result.hasErrors())
                    modelView.setViewName("company/companybasicinfo?errors");
  
                else
                    modelView.setViewName("company/companybasicinfo?msg");
        }catch(Exception e){
            e.printStackTrace();
        }
        return modelView;
  
      }
  
  }
  </code></pre>
  
  <p>In Log i am just seeing following message </p>
  
  <p>Aug 12, 2014 3:58:56 PM org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver handleHttpRequestMethodNotSupported
  WARNING: Request method 'POST' not supported</p>
  
  <p>Can any one help out where the wrong i am doing</p>
  
  <p>Thanks in advance. Please let me know if i need to provide any extra info</p>
  
  <p>Even tried in following way 
   </p>