title: JBoss AS 7.1.1 deployment issue
body: <p>I installed JBoss AS 7.1.1 server. 
  I created my project war file and put it under  <code>[JBOSS_HOME]\standalone\deployments</code> folder. </p>
  
  <p>My application is Spring MVC and here is my web.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"
      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;My WebApp&lt;/display-name&gt;
  
      &lt;!-- Configurations for the root application context (parent context) --&gt;
      &lt;listener&gt;
          &lt;listener-class&gt;org.springframework.web.util.Log4jConfigListener&lt;/listener-class&gt;
      &lt;/listener&gt;
  
      &lt;context-param&gt;
          &lt;param-name&gt;log4jConfigLocation&lt;/param-name&gt;
          &lt;param-value&gt;/WEB-INF/classes/log4j.xml&lt;/param-value&gt;
      &lt;/context-param&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/spring-jdbc.xml&lt;/param-value&gt;
      &lt;/context-param&gt;
  
      &lt;!-- Controller --&gt;
      &lt;servlet&gt;
          &lt;servlet-name&gt;myapp&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;/WEB-INF/spring/myapp-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;myapp&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/myapp/*&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  
  
  
      &lt;session-config&gt;
          &lt;session-timeout&gt;400&lt;/session-timeout&gt;
      &lt;/session-config&gt;
  
      &lt;error-page&gt;
          &lt;exception-type&gt;java.lang.Exception&lt;/exception-type&gt;
          &lt;location&gt;/WEB-INF/jsp/Error.jsp&lt;/location&gt;
      &lt;/error-page&gt;
  
      &lt;welcome-file-list&gt; 
      &lt;welcome-file&gt;/WEB-INF/jsp/welcome.jsp&lt;/welcome-file&gt;
      &lt;/welcome-file-list&gt;
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p>myapp-servlet.xml</p>
  
  <pre><code>&lt;context:annotation-config /&gt;
  &lt;context:component-scan base-package="com.mypackage.mvc" /&gt;
  
  &lt;bean id="PropertyPlaceholderConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/&gt;       
  
  
  &lt;bean id="jspViewResolver" 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/jsp/" /&gt;
      &lt;property name="suffix" value=".jsp" /&gt;
  &lt;/bean&gt;
  
  &lt;bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource"&gt;
      &lt;property name="basename" value="classpath:messages" /&gt;
      &lt;property name="defaultEncoding" value="UTF-8" /&gt;
  &lt;/bean&gt;
  
  &lt;bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"&gt;
      &lt;property name="messageConverters"&gt;
          &lt;list&gt;
              &lt;ref bean="jsonConverter" /&gt;
          &lt;/list&gt;
      &lt;/property&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="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"&gt;
      &lt;!-- the maximum file size in bytes = 10MB --&gt;
      &lt;property name="maxUploadSize" value="10485760" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>In the console log myapp-servlet.xml gets loaded by spring and all the request mapping are done from my controller. 
  Partial Log output:</p>
  
  <pre><code>12:27:13,440 INFO  [org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping] (MSC service thread 1-4) Mapped URL path [/myapp/welcome] onto handler 'myappController'
  12:27:13,442 INFO  [org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping] (MSC service thread 1-4) Mapped URL path [/myapp/welcome.*] onto handler 'myappController'
  12:27:13,444 INFO  [org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping] (MSC service thread 1-4) Mapped URL path [/myapp/welcome/] onto handler 'myappController'
  12:27:13,527 INFO  [org.springframework.web.servlet.DispatcherServlet] (MSC service thread 1-4) FrameworkServlet 'myapp': initialization completed in 1028 ms
  12:27:13,557 INFO  [org.jboss.web] (MSC service thread 1-4) JBAS018210: Registering web context: /myapp
  12:27:13,565 INFO  [org.jboss.as] (MSC service thread 1-1) JBAS015951: Admin console listening on http://127.0.0.1:9990
  </code></pre>
  
  <p>My Controller class is simple: </p>
  
  <pre><code>@Controller
  @RequestMapping("/myapp")
  public class MyappController {
  
      private static Logger log = Logger.getLogger(MyappController.class);
  
      // @formatter:off
      /**
       * Welcome to MyApp
       * 
       * 
       * @return welcome.jsp Page
       * 
       * 
       */
      // @formatter:on
      @RequestMapping(value = "/welcome", method = RequestMethod.GET)
      public String welcome() {
          log.debug("welcome() called...");
          return "welcome";
      }
  
  }
  </code></pre>
  
  <p>If I access <code>http://localhost:8080/</code> then my welcome.jsp loads in webpage. </p>
  
  <p>But the problem is
  Now when I try to access using the following url <code>http://localhost:8080/myapp/welcome.jsp</code> I see this error in webpage: </p>
  
  <pre><code>HTTP Status 404 - /myapp/welcome.jsp
  
  --------------------------------------------------------------------------------
  
  type Status report
  
  message /myapp/welcome.jsp
  
  description The requested resource (/myapp/welcome.jsp) is not available.
  
  
  --------------------------------------------------------------------------------
  
  JBoss Web/7.0.13.Final
  </code></pre>
  
  <p>Console log:</p>
  
  <pre><code>11:46:05,871 DEBUG [org.springframework.web.servlet.DispatcherServlet] (http-localhost-127.0.0.1-8080-1) DispatcherServlet with name 'myapp' processing GET request for [/myapp/welcome]
  11:46:05,873 DEBUG [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] (http-localhost-127.0.0.1-8080-1) Looking up handler method for path /welcome
  11:46:05,875 DEBUG [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] (http-localhost-127.0.0.1-8080-1) Did not find handler method for [/welcome]
  11:46:05,876 WARN  [org.springframework.web.servlet.PageNotFound] (http-localhost-127.0.0.1-8080-1) No mapping found for HTTP request with URI [/myapp/welcome] in DispatcherServlet with name 'myapp'
  11:46:05,878 DEBUG [org.springframework.web.servlet.DispatcherServlet] (http-localhost-127.0.0.1-8080-1) Successfully completed request
  </code></pre>
  
  <p>What could be wrong here? </p>