for example, in the java file, i create a private class call prgclm. and in the getChgDetail() function, i use sql to retrieve data and store them in an array. the array isCode:private class prgclm { double wp; double ln; int cnt; } public void getChgDetail(){ prgclm [] p = new prgclm[cnt]; for(int j=0;j<cnt;j++) { p[j] = new prgclm(); } String detail = "SELECT * FROM mrladf "+ " WHERE pf_la_no = '"+laNo+"'"+ " AND pf_supl_typ = '"+suplTyp+"'"+ " AND pf_vo_no = 0"; int j=0; ResultSet rs = null; Conn db=new Conn(); rs = db.execSQL(detail); while(rs.next()){ p[j].wp = rs.getDouble("pf_wp_no"); p[j].ln = rs.getDouble("pf_ln_no"); j=j+1; } db.close(); rs.close(); }
prgclm [] p = new prgclm[cnt];
after the data have been stored into the array that is prgclm [] p = new prgclm[cnt], how i gonna pass the array back to JSP page? does anyone know? becos i need to display the data at the JSP page there. thx>



Reply With Quote


Bookmarks