title: Ajax how to send spring mvc's view into a div
body: <p>Before I ask my next question, let me explain my project first. </p>
  
  <p>I have a web site that is running well now. It is basically a <strong>information publication</strong> web site, which means mainly there are a lots of static html pages.</p>
  
  <p>Application environment is: <strong>Tomcat 7.0.51</strong> running on <strong>Mac OS X server(3.1.1)</strong>. </p>
  
  <p>Application developed in Spring <strong>3.1.1</strong> with <strong>STS 3.5</strong>.</p>
  
  <p>The business applications have two parts:</p>
  
  <p><strong><em>Part 1</em></strong> is <strong>internal operational application</strong>. This one done, main business functions are here. Business functions include :</p>
  
  <ul>
  <li>business/product offering</li>
  <li>customer </li>
  <li>contract</li>
  <li>payment/invoice system </li>
  </ul>
  
  <p>The above are running fine. But this part of application does not have any control access. It works inside the firewall and is not publicly accessible. </p>
  
  <p><strong><em>Part 2</em></strong> is a <strong>business publication application</strong>, is deployed in same tomcat server as another application name, this part was exposed to public through <strong>AJP/Apache</strong> server on <strong>Port 80</strong>, it is publicly accessible. This part currently has about 23 html pages, is nested with <code>divs</code> and <code>iframes</code>, application view is classic <em>Header-LeftMenu-Content-Footer</em> style. Header, LeftMenu, Content and Footer are individual HTMLpages. Content is injected by press buttons located in LeftMenu panel. </p>
  
  <p>After a while of running this, we found that our customer is looking to leave some message or even register their information and apply business online on our web site, that's why I am trying to <strong>update it to a dynamic web application</strong>.</p>
  
  <p>As the business logic already done, I don't need redo it at all, just bring my internal business logic plus a access control mechanism to let customer register their interest and apply business online, without change business publication at all. so all the static html will stay without touch.</p>
  
  <p>I had done customer login/logout, session management logic through Ajax call through my Spring MVC controller, and now, I am planning bring business logic through Ajax call from html pages. </p>
  
  <p>I did make ajax call to talk to my business logic controller, the controller can set up my UI Model and return JSP handle to Ajax caller. JSP was called too (I found the debug information from catalina.out ). I am trying to send the JSP content to render a particular div, such as "Content", but I didn't get it yet.</p>
  
  <p>In my understanding, when I make ajax call from html, my MVC controller can set up my view and pass the JSP handle back to ajax as return value, and I can send that JSP handle to ajax success function as parameter, but unfortunately, from this point, I lost controlling, as JSP is MVC's view, and it don't return any thing to caller (Ajax). </p>
  
  <p>I am quite new with Ajax, I don't know how to let ajax to send a MVC's view to a specified div in its success function.</p>
  
  <p>Does any one have this sort experience to share with me, any advice is highly appreciated.</p>
  
  <p>Cidy from Australia</p>