1 package edu.sampleu.demo.kitchensink;
2
3 import javax.ws.rs.GET;
4 import javax.ws.rs.Path;
5
6
7
8
9
10
11
12 @Path("/")
13 public class DataTableRestServiceTestImpl {
14
15
16
17
18
19
20 @GET
21 @Path("/TableData")
22 public String getTableData() {
23 StringBuilder sb = new StringBuilder();
24
25 sb.append("{ \"aaData\": [\n");
26
27 for (int i = 0; i < 800; i++) {
28 sb.append("[\"CHEM " + i + "\",");
29 sb.append("\"INTRODUCTION TO GENERAL CHEMISTRY\",");
30 sb.append("\"3\",");
31 sb.append("\"AU\",");
32 sb.append("\"NW\",");
33 sb.append("\"Neal\",");
34 sb.append("\"MWF\",");
35 sb.append("\"300.00\",");
36 sb.append("\"3\",");
37 sb.append("\"100\"]");
38
39 if (i < 799) {
40 sb.append(",\n");
41 }
42 }
43
44 sb.append("\n] }");
45
46 return sb.toString();
47 }
48 }