Hello Im trying to pass an array from javascript to java servlet using Jackson, how this can be done..thanks
Take the 2-minute tour
×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
The basic idea should be straightforward: Server:
Client: Using jQuery (you can also do it with other frameworks, or manually). Load a copy of json2.js to make sure you have JSON.stringify.
|
|||||||||||||||||||||
|
For passing the array from the browser to the server side you don't need Jackson. You just need Ajax. For example, using jQuery you can do it this way:
Then on the server side, you might want to deserialize the JSON into a JavaBean or, in your case, a
Where |
|||||
|