Hello everyone, Anyone know how to pass post message information from an action containing a form to an action returning JSON result via an JSP page with a DOJO script calling the JSON result action? Please see example below. I am loosing the post message on the way. One solution could be to get the post message parameters from the value stack and then pass them into the DOJO script, but this sounds like a non-Struts way to me.
In the book "Practical Apache Struts2 Web 2.0 projects" written by Ian Roughley (Great book by the way!), chapter 10, there is an example without passing information into the action. I have based my solution on this example but cannot get it to work properly. <package name="products" namespace="/products" extends="struts-default"> <!-- ProductSearch Action --> <action name="productSearch" class="com.demand.product.ProductSearch"> <result>/jsp/product/productSearch.jsp</result> </action> <!-- ProductSearchResult Action --> <action name="productSearchResult" class="com.demand.product.BaseProductAction"> <result name="input">/jsp/product/productSearch.jsp</result> <result>/jsp/product/productSearchJsonResult.jsp</result> </action> </package> <package name="jsonProducts" namespace="/json/products" extends="json-default"> <default-interceptor-ref name="json"/> <action name="productsJsonResult" class="com.demand.product.ProductSearchResults"> <result type="json"> <param name="root">products</param> </result> </action> </package> Cheers! - Christer Gjerstad