title: How to map multiple url pattern in web.xml for Rest controller in spring mvc using tiles
body: <p>In dispatcher-servlet.xml file, i am having below configuration</p>
  
  <pre><code>&lt;bean id="viewResolver"
      class="org.springframework.web.servlet.view.UrlBasedViewResolver"&gt;
      &lt;property name="viewClass"
          value="org.springframework.web.servlet.view.tiles3.TilesView" /&gt;
  &lt;/bean&gt;
  
  
  &lt;bean id="tilesConfigurer"
      class="org.springframework.web.servlet.view.tiles3.TilesConfigurer"&gt;
      &lt;property name="definitions"&gt;
          &lt;list&gt;
              &lt;value&gt;/WEB-INF/tiles.xml&lt;/value&gt;
          &lt;/list&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p></p>
  
  <p>spring-security.xml file</p>
  
  <pre><code>&lt;http auto-config="true" use-expressions="true"&gt;
      &lt;intercept-url pattern="/resources/**" access="true" /&gt;
      &lt;intercept-url pattern="/login.htm" access="true" /&gt; 
      &lt;intercept-url pattern="/postSocialResponse.htm" access="true" /&gt;   
      &lt;intercept-url pattern="/rest/socialData/*" access="true" /&gt;
      &lt;intercept-url pattern="/**" access="hasAnyRole('ROLE_SA','ROLE_ADMIN', 'ROLE_LEAD','ROLE_AGENT')" /&gt; 
      &lt;form-login 
          login-page="/login.htm" 
          default-target-url="/" 
          authentication-failure-url="/login.htm?error" 
          username-parameter="username"
          password-parameter="password" /&gt;
      &lt;logout logout-success-url="/login.htm?logout" /&gt;
  </code></pre>
  
  <p>web.xml file</p>
  
  <pre><code>&lt;servlet&gt;
      &lt;servlet-name&gt;socialcare-dispatcher&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;socialcare-dispatcher&lt;/servlet-name&gt;
      &lt;url-pattern&gt;*.htm&lt;/url-pattern&gt;
  
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>GetSocialAnalyzedDataService.java file</p>
  
  <pre><code>@RestController
  @RequestMapping(value="/rest/socialData")
  public class GetSocialAnalyzedDataService {
      private Logger logger = LoggerFactory.getLogger(getClass());
  
      private static SocialAnalyzedDataRepository socialAnalyzedDataRepository= SocialAnalyzedRepositoryImpl.getInstance(); 
  
      @RequestMapping(value = "/{feedPostUserId}", method = RequestMethod.GET)
  
      public @ResponseBody String createMessage(@PathVariable String feedPostUserId) throws Exception {
          logger.info("feedpost user id"+feedPostUserId);
          return feedPostUserId;
      }
  }
  </code></pre>
  
  <p>Could anyone help me to call this URL using above configuration file.
  I am not able to access web service with url pattern <a href="http://localhost:8080/FilterRule/rest/socialData/234567" rel="nofollow noreferrer">http://localhost:8080/FilterRule/rest/socialData/234567</a></p>
  
  <p>If i am using the below code with <a href="http://localhost:8080/FilterRule/rest/socialData/create.htm" rel="nofollow noreferrer">http://localhost:8080/FilterRule/rest/socialData/create.htm</a> then it  is working</p>
  
  <pre><code>@RequestMapping(value="/rest/socialData")
  public class GetSocialAnalyzedDataService {
      private Logger logger = LoggerFactory.getLogger(getClass());
  
      private static SocialAnalyzedDataRepository socialAnalyzedDataRepository= SocialAnalyzedRepositoryImpl.getInstance(); 
  
      @RequestMapping(value = "/create.htm", method = RequestMethod.GET)
  
      public @ResponseBody String createMessage() throws Exception {
          logger.info("feedpost user id");
          return feedPostUserId;
      }
  }
  </code></pre>