I have a Struts2 application where I using Tiles. How can I get multiple result types in action-mappings? because I need to set de output as JSON data, and Tiles simultaneous. I
To my knowledge there is no way to return multiple things simultaneously. The browser will only be expecting one thing, either the JSON or the HTML once all the tiles stuff is done.
I can think of two ways to do this: double request (one for each result type) or use one to generate the other (get the JSON and use JavaScript to construct the HTML on the client).
What are you trying to accomplish that you need both results?
create a new result type for Tiles+JSON & use it... you can't define 2 result types in a result tag.
How about if u have 2 diff results?!
<result name="successJSON" type="json"/>
<result name="successTiles" type="tiles">tiles.home</result>
then in your server code u just route to the right one?!