Re: Returning response object only from Action

2011-09-28 Thread Christian Grobmeier
On Wed, Sep 28, 2011 at 6:27 PM, Anjib Mulepati wrote: > Thanks for your help. > I get the part to convert to/from the JSON object . But my problem was to > make such result fit within Struts. i.e. how can i populate the "data" into > select box using struts tag? Oh ok... now this is a little tim

Re: Returning response object only from Action

2011-09-28 Thread Anjib Mulepati
Thanks for your help. I get the part to convert to/from the JSON object . But my problem was to make such result fit within Struts. i.e. how can i populate the "data" into select box using struts tag? On 9/28/2011 12:14 PM, Christian Grobmeier wrote: Ajib, I am using jQuery, which makes an

Re: Returning response object only from Action

2011-09-28 Thread Christian Grobmeier
Ajib, I am using jQuery, which makes an json object out of the json string you would get. This is very straightforward. Since you are using plain javascript this is not possible so easily. Basically you get a string and need to turn it into a jsonobject. You could do it like that: http://www.json

Re: Returning response object only from Action

2011-09-28 Thread Anjib Mulepati
This is great I am able to get the String of all shows. But my ultimate goal was to get the result and populate in the select box. I am using AJAX since second box (charater) content depends upon first select box (tvshow). SO I need to parse String or is there any easy way to get values so that

Re: Returning response object only from Action

2011-09-28 Thread Christian Grobmeier
Hi Ajib, > public ActionForward execute(ActionMapping mapping, ActionForm inForm, > HttpServletRequest request, HttpServletResponse response) throws Exception { > >        // Get a list of characters associated with the select TV show >        String tvShow = (String) request.getParameter("tvShow"