Server-side Script Does Not Seem to Load
Server-side Script Does Not Seem to Load
andrewmoreno
Posts: 10Questions: 0Answers: 0
Allan, thanks so much for this tool! I am just starting out in my career and I have already seen how DataTables will be a big help.
I recently began using DataTables (successfully - it looks great!), however, I am having to switch from client side to server-side processing because the amount of rows I need to load when first initializing is about 6000 and, unfortunately, since IE 6.0 is still the official browser browser supposed at my company - all of my internal users will be using it and the page takes way too long to load (Chrome works great however).
I was able to follow the example, but my problem seems to be that I can not seem to get the server-side script set in "sAjaxSource" to work. We are using JSP in my department, so I have taken the example that you provided in your script examples page and modified it to my needs. Problem is, I do not think it is even being called, as I put a println on the first line of my JSP to check in my console and it never appears. On my page I just see the tbody row "Loading Data from Server" and at some point the "Processing" message was appearing, but it is currently not.
Below is the code I am using to implement the server-side functionality.
[code]
oTable = $('#example').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "../jsp/rmlAjaxSearch.jsp"
} );
[/code]
Do you know of anything else I could be missing to get my script to run? Thanks in advance.
I recently began using DataTables (successfully - it looks great!), however, I am having to switch from client side to server-side processing because the amount of rows I need to load when first initializing is about 6000 and, unfortunately, since IE 6.0 is still the official browser browser supposed at my company - all of my internal users will be using it and the page takes way too long to load (Chrome works great however).
I was able to follow the example, but my problem seems to be that I can not seem to get the server-side script set in "sAjaxSource" to work. We are using JSP in my department, so I have taken the example that you provided in your script examples page and modified it to my needs. Problem is, I do not think it is even being called, as I put a println on the first line of my JSP to check in my console and it never appears. On my page I just see the tbody row "Loading Data from Server" and at some point the "Processing" message was appearing, but it is currently not.
Below is the code I am using to implement the server-side functionality.
[code]
oTable = $('#example').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "../jsp/rmlAjaxSearch.jsp"
} );
[/code]
Do you know of anything else I could be missing to get my script to run? Thanks in advance.
This discussion has been closed.
Replies
if this is your dir structure:
root --> main_page --> jsp
you should do this:
[code]
"sAjaxSource": "jsp/rmlAjaxSearch.jsp"
[/code]
you might want to check in FF firebug to see what is happening to the xhr response.
Eclipse is now giving me a syntax error stating: "Syntax error, parameterized types are only available if source level is 5.0." The funny thing is, I am definitely using 5.0 as the same line of code is working in plenty of other java classes within my application. This is very odd...anyone have any insight to offer?
I was able to discover that it was an issue with the default settings for Websphere WAS 6.1 servers. Although your Java code is being compiled using 1.5 or greater, the configuration files have JSP defaulted to compile using 1.3 compilers. I was able to add a parameter to one of the config files and the table loads nicely now.
Still having some issues with the filtering, namely that it gets stuck processing on certain sSearch strings. It returns a bad response:
Error 500: Index: 0, Size: 0
The parameters passed seem to look ok:
bEscapeRegex true
bEscapeRegex_0 true
bEscapeRegex_1 true
bEscapeRegex_2 true
bEscapeRegex_3 true
bEscapeRegex_4 true
bEscapeRegex_5 true
bSearchable_0 true
bSearchable_1 true
bSearchable_2 true
bSearchable_3 true
bSearchable_4 true
bSearchable_5 true
bSortable_0 true
bSortable_1 true
bSortable_2 true
bSortable_3 true
bSortable_4 true
bSortable_5 true
iColumns 6
iDisplayLength 10
iDisplayStart 0
iSortCol_0 0
iSortingCols 1
sColumns
sEcho 5
sSearch 1000
sSearch_0
sSearch_1
sSearch_2
sSearch_3
sSearch_4
sSearch_5
sSortDir_0 asc
See: http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#5xx_Server_Error
For status codes
IndexOutOfBoundsException seems that your trying to access an array with an index larger than allocated.
Thanks again!
De Nada. If there are some problems let us know. I have a meeting from 1-3 this afternoon pacific time, so I won't be available, but go ahead and leave something if you get stuck.