This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Struts and the fly likes How to call struts application through JSON Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "How to call struts application through JSON " Watch "How to call struts application through JSON " New topic
Author

How to call struts application through JSON

Mumtaz Khan
Ranch Hand

Joined: Feb 21, 2008
Posts: 53
Hi,

How can I make a call to struts 2.0 based webapplication from a mobile application as client ? I know this can be done with JSON, but I am a newbie to both struts and JSON. Can anyone help me.


SCJP 5.0 -- 97%
Mumtaz Khan
Ranch Hand

Joined: Feb 21, 2008
Posts: 53
Hi,

I have a struts2 based web application and I am using json-default to return json result type as response from my action class. I am able to call this action from browser but not from another application, which is a mobile based application that is developed in javascript. Here is my javascript code to call the action in struts web application:
Entry in struts.xml is:

Do I need an interceptor in struts application to receive request from mobile application?What is the other way to call struts 2.0 application from a mobile application to receive JSON response? Looking from some help.Thanks in advance.


 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How to call struts application through JSON
 
Similar Threads
Jstree with struts 2
Struts2-json plugin not serializing action class to json
i want to create a file in the server from the client? is it possible?
javascript and json in struts2 tiles pugin.
Populate Table Rows With Data from AJAX