Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
RamC ChandraS
Greenhorn
Posts: 5
AngularJS Mac OS X Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic