title: URL Mapping issue - Spring web MVC
body: <p>I'm a newbie with Spring and web MVC module. Basically, i have the following :</p>
  
  <p>web.xml</p>
  
  <pre><code>&lt;servlet&gt;
      &lt;servlet-name&gt;abc-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;abc-dispatcher&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/user/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>abc-dispatcher-servlet.xml</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:context="http://www.springframework.org/schema/context"
     xsi:schemaLocation="http://www.springframework.org/schema/beans
     http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
     http://www.springframework.org/schema/context
     http://www.springframework.org/schema/context/spring-context-3.0.xsd"&gt;
  
  
  &lt;context:component-scan base-package="myPkg" /&gt;
  
  
  &lt;bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
      &lt;property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/&gt;
      &lt;property name="prefix" value="/WEB-INF/pages/"&gt;&lt;/property&gt;
      &lt;property name="suffix" value=".jsp"&gt;&lt;/property&gt;        
  &lt;/bean&gt;
  </code></pre>
  
  <p></p>
  
  <p>And i have a controller, related parts are :</p>
  
  <pre><code>@Controller
  public class ABCController {
  
  @RequestMapping("/user/welcome")
  public String printWelcome(ModelMap model) {
  
      //code
  
  }
  </code></pre>
  
  <p>Now whenever i try to access <code>http://localhost:8080/myapp/user/welcome</code></p>
  
  <p>it gives me 404.</p>
  
  <p>Logs say that "mapped url '/user/welcome' onto handler 'ABCController' but it failed to map URI [/<strong>MYAPP</strong>/user/welcome] in DispatcherServlet with name 'abc-dispatcher' .</p>
  
  <p>Totally confused. I have checked all the threads where we specify a mapping twice, but that's not the case here. I must be missing something!</p>
  
  <p>Thanks for the help!</p>