My Datatable is not displaying

My Datatable is not displaying

aydeggyaydeggy Posts: 1Questions: 0Answers: 0
edited March 2011 in Plug-ins
Kingly assist me with this issue. i am trying to render a table by calling a Jsp page with sAjaxSource but the table is not been populated. i run my app from within jboss.

////////////////////////////
Server-side code (jsonexample2.jsp)
////////////////////////////////////
<%@ page language="java" import="java.sql.*, javax.naming.*, javax.sql.DataSource, com.nibss.*, java.util.*,net.sf.json.*,java.util.*" session="true" %>

<%


String table = "users";

JSONObject result = new JSONObject();
JSONArray array = new JSONArray();
TechSite techSite = new TechSite ();


int total = 10;

int totalAfterFilter = 5;
int echo = 1;
result.put("sEcho",echo);

try {
int bin =0;
while (bin < 10) {
bin =bin +1;
JSONArray ja = new JSONArray();
ja.add("eeee");
ja.add("eeee");
ja.add("eeee");
ja.add("eeee");
ja.add("eeee");
array.add(ja);
}
} catch (Exception e) {

}

totalAfterFilter =5;
result.put("iTotalRecords", total);
result.put("iTotalDisplayRecords", totalAfterFilter);
result.put("aaData", array);
response.setContentType("application/json");
response.setHeader("Cache-Control", "no-store");
//out.print(result);

out.print(result);



%>
//////////////////////////
client-side
////////////////////////////////
<%@ page language="java" contentType="text/html;charset=UTF-8" import="java.sql.*, javax.naming.*, javax.sql.DataSource, com.nibss.*, java.util.*" session="true" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">


Untitled Document






@import "media/css/demo_page.css";
@import "media/css/demo_table.css";
@import "media/css/demo_table_jui.css";
@import "media/css/menu.css";

alert('hi');
$(document).ready(function() {
$('#example').dataTable( {
"bProcessing": true,

"sAjaxSource": "jsonexample2.jsp"

} );
} );








Rendering engine
Browser
Platform(s)
Engine version
CSS grade




Loading data from server




Rendering engine
Browser
Platform(s)
Engine version
CSS grade






///////////////////////////////////////
This discussion has been closed.