This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes Jsp To StrutsAction1, what are my choices for passing Json string, how? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Jsp To StrutsAction1, what are my choices for passing Json string, how?" Watch "Jsp To StrutsAction1, what are my choices for passing Json string, how?" New topic
Author

Jsp To StrutsAction1, what are my choices for passing Json string, how?

RamC ChandraS
Greenhorn

Joined: Aug 18, 2010
Posts: 1
Hi All,

I have some knowledge on all Jsp, Json(gson) and Struts 1 action.

I need to send json string(basically java 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.

Thanks,

rcs
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60789
    
  65

Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

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.
 
wood burning stoves
 
subject: Jsp To StrutsAction1, what are my choices for passing Json string, how?
 
Similar Threads
Struts2-json plugin not serializing action class to json
JSON with JSp
openflashchart problem in struts2
JSON in JSP
Handling Ajax response in struts2