Jquery function to load initial data via ajax
Jquery function to load initial data via ajax
ManiHIn
Posts: 17Questions: 4Answers: 0
Hello,
We use JSP and want to recieve Json data via Axaj call, everything works fine with json, BUT datatable cannot handle our json response. This is our response:
{"data": [{"vorname": "XX","nachname": "XX"},{"vorname": "XX","nachname": "XX"}]}
Datatable response an json invalid error?!?!
Could anyone please help us to solve this problem?
Thanks
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
The error provides a URL with troubleshooting steps:
https://datatables.net/manual/tech-notes/1
That is the place to start. Let us know what you find.
Kevin
Thanks for the link this is my response error
<!doctype html><html lang="de"><head><title>HTTP Status 500 – Internal Server Error</title><style type="text/css">h1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} h2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} h3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} body {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} b {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} p {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;} a {color:black;} a.name {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body>
HTTP Status 500 – Internal Server Error
Type Exception Report
Bescrheibung The server encountered an unexpected condition that prevented it from fulfilling the request.
Exception
Hinweis Der komplette Stacktrace der Ursache ist in den Server logs zu finden
Apache Tomcat/9.0.14
</body></html>
Hope you can give any idea.
Manuel
"HTTP Status 500 – Internal Server Error" - so check your server's error logs for the details.
we solved the problem
String action = null was the problem, so we set action ="get" and it works nice now
thank
Manuel