java - How To Create JSON Array Object With JSP Declarations -
I am new to JEE. I want to make json data in the jsp declarion tag, e can help me. This is my source code & lt;%! Public double getTax (string name, double AMT, double DI) {double total = 0.0; Hashmap & lt; String, double & gt; Hm = new Hashmop & lt; String, double & gt; (); Prepared state PS = DBCNation.Jetpreiere ("value, op, intelligence, select formula," + "Tax type tax where name =?"); Try {System.out.println ("Discount:" + D); Ps.setString (1, name); Results set rs = ps.executeQuery (); String form = "sub-discount"; System.out.println ("---------------- Tax Value Details -------------------"); JSONObject json1 = new JSONObject (); JSONArray jarr = new JSONArray (); While (rsnext ()) {JSONObject o = New JSONObject (); Double val = rs.getDouble (1); String op = rjest string (2); String IQ = R.Jest String (3); Form = rs.getString (4); String type = rs.getString (5); O.put ("val", val); Double su...