• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

sending the javascript object to struts 2 action class

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah, the ways I suggested.
 
swapnil kachave
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic