title: How to include a controller from jsp page
body: <p>I'm using Spring MVC.</p>
  
  <p>I want to include menu page (named menu.jsp) with a controller (named MenuController) to my main page.
  If I call <a href="http://localhost:8080/myWeb/menu.htm" rel="nofollow">http://localhost:8080/myWeb/menu.htm</a>  everything is fine. 
  But I try include menu into my main page like this :</p>
  
  <pre><code>&lt;c:import url="menu.jsp"&gt;&lt;/c:import&gt;
     Or  &lt;c:import url="menu.htm"&gt;&lt;/c:import&gt;
  </code></pre>
  
  <p>it shows nothing</p>
  
  <p>This is config in dispatcher-servlet.xml file:</p>
  
  <pre><code>    &lt;mvc:annotation-driven /&gt;
  
      &lt;context:component-scan base-package="controllers" /&gt;
  
  
      &lt;bean id="viewResolver"
          class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
  
          &lt;property name="prefix"&gt;
              &lt;value&gt;/views/&lt;/value&gt;
          &lt;/property&gt;
          &lt;property name="suffix"&gt;
              &lt;value&gt;.jsp&lt;/value&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p>and web.xml</p>
  
  <pre><code>  &lt;servlet&gt;
      &lt;servlet-name&gt;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;dispatcher&lt;/servlet-name&gt;
      &lt;url-pattern&gt;*.htm&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>Where am I wrong? Please help me. Thanks!</p>