get ajax request data from jsp page

I have this code in JSP

        Map<String, Long> map = new HashMap<String, Long>();         map.put("A", 10L);         map.put("B", 20L);         map.put("C", 30L);          JSONObject json = new JSONObject();         json.accumulateAll(map);          System.out.println(json.toString());           List<String> list = new ArrayList<String>();         list.add("Sunday");         list.add("Monday");         list.add("Tuesday");          json.accumulate("weekdays", list);         System.out.println(json.toString()); 

It prints

Info:   2 Info:   {"A":10,"B":20,"C":30} Info:   {"A":10,"B":20,"C":30,"weekdays":["Sunday","Monday","Tuesday"]} 

In netbeans's ouput

my ajax is

var id = $(this).attr('data-id');  $.ajax({     type: 'POST',     url: '../include/residents.jsp',     dataType: "json",     data: {         id: id,     },     success: function(data) {},     error: function(data) {} }).done(function() { }); 

How can I show those ouput data in ajax success or done functions?

Replay

Category: javascript Time: 2016-07-29 Views: 0

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.152 (s). 12 q(s)