title: Struts2 action not working with result type both json and dispatcher
body: <p>I have a Struts2 action with result type json. That action gets called from Ajax and a response (an ArrayList) is being received at client side. This is working fine. 
  Now, I need to redirect the action to some error page in case of any login error.  So, I tried to include one more result type so that a JSP page can get called. But, it is not working. Please help.</p>
  
  <p><strong>My Action in Struts.xml</strong></p>
  
  <pre><code>&lt;action name="stocktransferorder" class="com.app.action.StockTransferOrderAction"
              method="createSTO"&gt;
              &lt;result name="jsonStockTransferOrderSuccess" type="json" /&gt;
              &lt;result name="error" type="dispatcher"&gt;/jsp/loginError.jsp&lt;/result&gt;
          &lt;/action&gt;
  </code></pre>
  
  <p><strong>My Java Code</strong></p>
  
  <pre><code>String s = (String) session.getAttribute("SAPUSERID");
  if (s != null &amp;&amp; s.length() &gt; 0) {
          // My code goes here
          return "jsonStockTransferOrderSuccess";
  
  else
          {
              return "error";
          }
  }
  </code></pre>
  
  <p><strong>Getting below lines in console and nothing is happening on the screen</strong></p>
  
  <pre><code>11:38:49,573 DEBUG ServletDispatcherResult:72 - Forwarding to location /jsp/loginError.jsp
  11:38:49,573 DEBUG InstantiatingNullHandler:72 - Entering nullPropertyValue [target=[com.app.action.StockTransferOrderAction@19ae493, com.opensymphony.xwork2.DefaultTextProvider@1dedb45], property=struts]
  11:38:49,574 DEBUG InstantiatingNullHandler:72 - Entering nullPropertyValue [target=[com.app.action.StockTransferOrderAction@19ae493, com.opensymphony.xwork2.DefaultTextProvider@1dedb45], property=org]
  11:38:49,607 DEBUG InstantiatingNullHandler:72 - Entering nullPropertyValue [target=[com.app.action.StockTransferOrderAction@19ae493, com.opensymphony.xwork2.DefaultTextProvider@1dedb45], property=locale]
  </code></pre>