File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes sending the javascript object to struts 2 action class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "sending the javascript object to struts 2 action class" Watch "sending the javascript object to struts 2 action class" New topic
Author

sending the javascript object to struts 2 action class

swapnil kachave
Greenhorn

Joined: Feb 10, 2010
Posts: 27
i want to create the object in javscript and send the struts 2 action class.
can any one know any way to do this
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

The only thing clients send to the server is a string. You might want to consider using JSON, or you might consider being more specific with your question.

(Depending on your actual needs, DWR might be worth exploring.)
swapnil kachave
Greenhorn

Joined: Feb 10, 2010
Posts: 27
David Newton wrote:The only thing clients send to the server is a string. You might want to consider using JSON, or you might consider being more specific with your question.

(Depending on your actual needs, DWR might be worth exploring.)


on the server there is an object of the class which is pojo.
i want to send the object from javascript which map with the java pojo object.
is there any way for this..
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Yeah, the ways I suggested.
swapnil kachave
Greenhorn

Joined: Feb 10, 2010
Posts: 27
actully what i doned is i putted the json plug in strut2 application..
becouse of that i only have to define the result type as json for sending response.

but in the reverse case when i want to send from javascript object to server.
how i can do this.
 
Don't get me started about those stupid light bulbs.
 
subject: sending the javascript object to struts 2 action class