title: How to return jsp page in spring mvc 3 ajax call
body: <p>I have a main page with header, footer, left panel and main content. I want to dynamically change main content on click of left panel. For this I am using ajax call, ajax will call controller and controller will return jsp which I will replace in main content.</p>
  <p>But the problem I am facing is that I am getting JSP properly if I am using purely html coding but if I use spring form it is not working.</p>
  <p>Do I need to declared taglib in all jsp or only in Dashboard jsp.</p>
  <ol>
  <li><p>If I declare taglib in all child jsp then it not working and I do not declare then form:input do not render in to html</p>
  </li>
  <li><p>Can we return jsp in ajax call to replace with main content because <a href="https://stackoverflow.com/questions/18673735/ajax-spring-controller-jsp">here</a> it says only @ResponseBody (JSON) can be used in ajax call.</p>
  </li>
  <li><p>I am using ajax call because I don't want to reload all my header, footer and left panel because they will always remain same.</p>
  </li>
  </ol>
  <p>Ajax code</p>
  <pre><code>&lt;script type=&quot;text/javascript&quot;&gt;
    $(&quot;.ldMainContent&quot;).click(function(){
      var actionName = this.id;
      actionName = &quot;${pageContext.request.contextPath}/sadmin/forward/&quot;+actionName;
           $.ajax({
              url:actionName,
              type:&quot;POST&quot;,
              data:&quot;URL&quot;,
              success:function(result){
              $(&quot;#mainContent&quot;).html(result);              
            }
         });  
     });
      
  &lt;/script&gt;
  </code></pre>
  <p>I am using bootstrap in design</p>