Hi Everyone,
I am trying to use jQuery with servlet to generate dynamic table in the view page. I am using jquery.dataTables.js & jquery.js to generate dynamic table.
In the above String json i am giving fixed data to be shown in the table. But what i want is to get the data from database and pass them here on Runtime. eg: if i want to pass "jhon" instead of "awesome" , how would i "s" reference to it .
Tarun,
If you can guarantee that the String doesn't have special characters like quotes in it, you can just append it:
If you don't know this, I recommend using a library like Gson to protect you from those characters. Or have a regular expression to strip them out before appending.