Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within HTML Pages with CSS and JavaScript
Search Coderanch
Advance search
Google search
Register / Login
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
Forum:
HTML Pages with CSS and JavaScript
backbone/servlet red JSON data ?
Miran Cvenkel
Ranch Hand
Posts: 245
2
posted 7 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
It appears I send JSON data successfuly via backbone.js to server, as request.getContentType() on server gives me "application/JSON".
Can't figure out how to extract data from request. Any tip about that ?
js:
var user = new UserModel(); var userDetails = { name: 'Thomas', email: 'thomasalwyndavis@gmail.com' }; user.save(userDetails, { success: function (user) { alert(JSON.stringify(user)); } })
target
servlet
:
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { //request.getContentType()// spits "application/JSON //how to read JSON data using org.json.simple ?
Searchable nature photo gallery:
http://agrozoo.net/jsp/Galery.jsp?l2=en
Miran Cvenkel
Ranch Hand
Posts: 245
2
posted 7 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Found it:
get json data from request
Searchable nature photo gallery:
http://agrozoo.net/jsp/Galery.jsp?l2=en
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Ajax request help
Confusion about ajax call
Consuming REST API exposed by Node.js in Backbone.js
Ext JS: how to populate grid with values from servlet
Empty answer when trying to get JSON from Jersey Server
More...