It's not a secret anymore!
The moose likes Struts and the fly likes json call to a struts action Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "json call to a struts action" Watch "json call to a struts action" New topic

json call to a struts action

Raj Ohadi
Ranch Hand

Joined: Jun 30, 2006
Posts: 316
from javascript we can make json call and expose some struts action's methods as json. Is it possible when we access an action from a URL, it directly uses json method(s) in the action class and forward the results to JSP ? In other words, do we have to make json call on action class methods from javascript only ?
David Newton

Joined: Sep 29, 2008
Posts: 12617

I'm not sure what you're asking. By a "JSON call" do you mean an Ajax call?

*How* a request is crafted doesn't matter--just that all the data expected is present. I'm not sure what a "JSON method in an action class", either.
I agree. Here's the link:
subject: json call to a struts action
jQuery in Action, 3rd edition