title: PageNotFound:1136 - No mapping found for HTTP request with URI [] in DispatcherServlet with name 'spring'
body: <p>I get WARN  PageNotFound:1136 - No mapping found for HTTP request with URI [/CATestSlotBooking/show] in DispatcherServlet with name 'spring', when I click any link from welcome.jsp.</p>
  
  <p>Below is the controller class</p>
  
  <pre><code>@Controller
  public class BookingSlotController {
  
  @RequestMapping(value = "/show", method = RequestMethod.GET)
  public String showBookingPage(ModelMap model) {
      BookingSlotVO bookingDetailsVO = new BookingSlotVO();
      model.addAttribute("bookingSlotVO", bookingDetailsVO);
      return "booking";
  }
  </code></pre>
  
  <p>Dispatcher servlet MXL</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:mvc="http://www.springframework.org/schema/mvc"
  xsi:schemaLocation="
  http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans.xsd
  http://www.springframework.org/schema/context
  http://www.springframework.org/schema/context/spring-context.xsd
  http://www.springframework.org/schema/mvc
  http://www.springframework.org/schema/mvc/spring-mvc.xsd"&gt;
  
  &lt;context:annotation-config /&gt;
  
      &lt;context:component-scan base-package="com.cts" /&gt;
  
  &lt;bean id="viewResolver"  class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
  &lt;property name="prefix" value="/WEB-INF/views/" /&gt;
  &lt;property name="suffix" value=".jsp" /&gt;
  &lt;/bean&gt;
  
  &lt;bean id="localeResolver" class="org.springframework.web.servlet.i18n.SessionLocaleResolver"&gt;
  &lt;property name="defaultLocale" value="en" &gt;&lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;mvc:interceptors&gt;
  &lt;bean id="localChangeInterceptor" class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor"&gt;
  &lt;property name="paramName" value="lang" /&gt;
  &lt;/bean&gt;
  &lt;/mvc:interceptors&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p>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_2_5.xsd"
  id="WebApp_ID" version="2.5"&gt;
  &lt;display-name&gt;OnlineTestSlotBooking&lt;/display-name&gt;
  &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;Welcome.html&lt;/welcome-file&gt;
      &lt;welcome-file&gt;Welcome.htm&lt;/welcome-file&gt;
      &lt;welcome-file&gt;Welcome.jsp&lt;/welcome-file&gt;
  &lt;/welcome-file-list&gt;
  &lt;servlet&gt;
      &lt;servlet-name&gt;spring&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;spring&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p>welcome.jsp</p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
  pageEncoding="ISO-8859-1"%&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 http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
  &lt;title&gt;Welcome page&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;p&gt; CA Enablement Assessments &lt;/p&gt;
  &lt;hr&gt;
  
  &lt;a href="show"&gt;Book a slot for assessment&lt;/a&gt;
  
  &lt;div style="text-align: right; background-color: yellow "&gt;
  &lt;a href="${pageContext.request.contextPath}/show?lang=en" &gt;Login(English) 
  &lt;/a&gt;
  &amp;nbsp;&amp;nbsp;
  &lt;a href="${pageContext.request.contextPath}/show?lang=es" &gt;Login(Spanish) 
   &lt;/a&gt;
  
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/rOKAa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rOKAa.png" alt="enter image description here"></a></p>
  
  <p>When I click on any link in welcome.jsp, I get 404 error. If I change URL pattern to /* or *.do in web.xml, I don't get welcome.jsp page.</p>