Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8798611
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:08:05+00:00 2026-06-14T00:08:05+00:00

I have a Java Web Project where I have a GET endpoint that I

  • 0

I have a Java Web Project where I have a GET endpoint that I am hitting to retrieve JSON data. Firebug shows I am getting the JSON data in the form

[{"id":7,"serial":"7bc530","randomDouble":0.0,"randomDouble2":0.0,"randomDouble3":0.0,"date":1352228474000,"removed":null},
{"id":8,"serial":"4a18d27","randomDouble":0.0,"randomDouble2":0.0,"randomDouble3":0.0,"date":1352228474000,"removed":null},
{"id":9,"serial":"f30ef","randomDouble":0.0,"randomDouble2":0.0,"randomDouble3":0.0,"date":1352228474000,"removed":null},
{"id":10,"serial":"9e6d","randomDouble":0.0,"randomDouble2":0.0,"randomDouble3":0.0,"date":1352228474000,"removed":null},
{"id":11,"serial":"4d8665a3","randomDouble":0.0,"randomDouble2":0.0,"randomDouble3":0.0,"date":1352228474000,"removed":null},
{"id":12,"serial":"4fe1457","randomDouble":0.0,"randomDouble2":0.0,"randomDouble3":0.0,"date":1352228474000,"removed":null}]

On the HTML side I have this,

<table id="table_id">
   <thead>
      <tr>
      <th>id</th>
      <th>serial</th>
      <th>randomDouble</th>
      <th>randomDouble2</th>
      <th>randomDouble3</th>
      <th>date</th>
      <th>removed</th>
      </tr>
</thead>
 <tbody>
</tbody>
</table>

Here is what I have on the javascript side, I found another post from someone on here with this format that worked for them.

$(document).ready(function() {

    var Table = $("#table_id").dataTable({
       "bFilter":false,
       "bPaginate":false,
       "bProcessing": true,
       "bServerSide":true,
       "bInfo":false,
       "sAjaxSource": ApiUrl(),
       "fnServerData": function (sSource, aoData, fnCallback){
           $.ajax({
            "dataType": 'json',
               "type": "GET",
               "url": sSource,
               "data": aoData,
               "success": fnCallback
           }); 
       }
    });

The table is displaying the columns, but it isn’t pulling in the data. As I said, I did verify that the JSON data is getting sent to the webpage through Firebug — through the GET request this is making.

I find datatables to be extremely confusing and I can’t get this JSON to actually populate…

Any assistance would be very appreciated.

Edit:

I tried this,

var Table = $("#table_id").dataTable({
       "bFilter":false,
       "bPaginate":false,
       "bProcessing": true,
       "bServerSide":true,
       "bInfo":false,
       "sAjaxSource": ApiUrl(),
       "sAjaxDataProp": ""
    });
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T00:08:06+00:00Added an answer on June 14, 2026 at 12:08 am

    This should work for server side:

     var Table = $("#table_id").dataTable({
       "bFilter":false,
       "bPaginate":false,
       "bProcessing": true,
       "bServerSide":true,
       "bInfo":false,
        "aoColumns": [
        { "mData": "id" },
        { "mData": "serial" },
        { "mData": "randomDouble" },
        { "mData": "randomDouble2" },
        { "mData": "randomDouble3" },
        { "mData": "date" },
        { "mData": "removed" }
    
        ],
       "sAjaxSource": "url",
       "fnServerData": function ( sSource, aoData, fnCallback ) {
        $.getJSON( sSource, aoData, function (json) { 
            map = {}
            map["aaData"] = json
            fnCallback(map)
        } );
    }
    });
    

    UPDATE regarding last comment:

    "fnServerData": function ( sSource, aoData, fnCallback ) {
      $.getJSON( sSource, aoData, function (json) { 
            $.getJSON('second_json_url', function(secondjson) {
                $.each(secondjson, function(index, object) {
                  json[index].serial = secondjson[index].name
                })
                map = {}
                map["aaData"] = json
                fnCallback(map)
            })
      });
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Java Web Services project that was created in an older version
I have recently created a web project in Java using eclipse. I have a
We have a Java web service that we call from our application. When we
I have a Java web app running on Tomcat 7 that is using JDBC
I have a Java Web project, Nginx as the http proxy, Tomcat as the
I have a java web application project with Spring framework in netbeans and I'm
I have a thread in a Java web application that causes a java.lang.OutOfMemoryError: Java
I have done the following settings to run a Java web project but somehow
I have a java web project containing JAX-RS resource classes like this: @Stateless @Path(user)
I have an Eclipse web project that was working perfectly fine until I converted

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.