Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

sending the javascript object to struts 2 action class

 
Greenhorn
Posts: 27
  • 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
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • 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
  • 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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, the ways I suggested.
 
swapnil kachave
Greenhorn
Posts: 27
  • 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.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic