File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sending the javascript object to struts 2 action class

 
swapnil kachave
Greenhorn
Posts: 27
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 27
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, the ways I suggested.
 
swapnil kachave
Greenhorn
Posts: 27
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic