title: Struts2+jsonplugin: response takes a long time to display in browser from remote server
body: <p>Sending request to action using Ajax, the result type is json. Use a json plugin for struts2. The result is correct, but takes a very long time. </p>
  
  <p>Below is the content of struts.xml:</p>
  
  <pre><code>&lt;package name="FoodCompositionSearchajax"  extends="json-default"&gt;
        &lt;action name="addSearchCondition" class ="com.fmOnline.action.FmzxMenuCompositionSearchAction" enter code here
  method="addSearchCondition"&gt; 
            &lt;result name="success" type="json"&gt;
             &lt;param name="excludeProperties"&gt;
       showList\[\d+\]\.foodStr,showList\[\d+\]\.nourishStr, 
       showList\[\d+\]\.searchFunction,showList\[\d+\]\.num1, 
       showList\[\d+\]\.num2,showList\[\d+\]\.danwei, 
       showList\[\d+\]\.nourishname,showList\[\d+\]\.resultmap, 
       dataList, foodList, foodStr, map, nourishList, nourishStr, 
       num1, num2, paramList, searchDes, searchFun
     &lt;/param&gt; 
            &lt;/result&gt;
       &lt;/action&gt;
   &lt;/package&gt;
  </code></pre>
  
  <p>The <code>&lt;param name="includeProperties"&gt;</code> does not work, so use <code>&lt;param name="excludeProperties"&gt;</code> instead.</p>
  
  <p>The result json contains a list (showList, contains 2 String attributes, the number of elements varies from 1 to 6) and a String. I have alerted the result content from the javascript in the client page, and the <code>&lt;param name="excludeProperties"&gt;</code> works.</p>
  
  <p>The json result is : 
  {"msg":null, "showList":[{"id":1, "searchDes":"淀粉中的蛋白质含量>=11"}, {"id":2,"searchDes":"豆类中的蛋白质含量>=11"}, {"id":3, "searchDes":"禽类中的蛋白质含量>=11"}]}</p>
  
  <p>At first, I used <code>&lt;result type="json"/&gt;</code>. I though the cause of the long time may be a too large object. Then I tried to @JSON(serialize=false) to deserialize the get methods, so that these methods will not execute at the conversion process from java to json. Finally I used excludeProperties. They all succeed in returning smaller object but failed to shorten the time. The response time of a normal jsp page is good</p>
  
  <p>Problem:</p>
  
  <ol>
  <li><p>When running the project on the local host, the response time is short.</p></li>
  <li><p>When running in the remote server, it takes above 10 seconds to response on the client side. Operating Database is really quick, it seems that it takes a long time to send the result from server to browser.</p></li>
  <li><p>When the result is null, the response time is short, even from remote server.</p></li>
  </ol>
  
  <p>How can I shorten the response time?</p>