A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Head First Android
this week in the
Jsp To StrutsAction1, what are my choices for passing Json string, how?
Joined: Aug 18, 2010
Aug 18, 2010 17:23:45
I have some knowledge on all
, Json(gson) and
I need to send json
string) as a result so the requestor(the jsp page) can get that string.
I don't know exactly how to use the Session, request, response in terms of setting and getting parameter and/or attribute in this particualr case.
Any insight or suggestion would be greatly appreciated.
Author and ninkuma
Joined: Jan 10, 2002
Aug 18, 2010 17:59:42
Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.
Asking smart questions
Books by Bear
Joined: Sep 29, 2008
Aug 19, 2010 07:38:09
The response of a request is text. Period. You need to generate a JSON string to send back. You could write directly to the response, or generate the JSON in a JSP, etc.
It is sorta covered in the
JavaRanch Style Guide
subject: Jsp To StrutsAction1, what are my choices for passing Json string, how?
JSON with JSp
Struts2-json plugin not serializing action class to json
openflashchart problem in struts2
JSON in JSP
Handling Ajax response in struts2
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015