User will select No.Of MessageId's in one jsp and submit to the next jsp, as per user selected message id's another jsp will create xls sheet(data came from database),kept in one folder at the server and i nedd to download the created excel sheets, i have written download program using response.setheader(); in same jsp
i can able to download only one xls sheet remaining are NOT getting download, i want to estimate the time to download one file and then i can stop the next line of the code , how to download a multiple files in a loop of user selected message id's
Below is the code to creating xls sheet and downloading file written in jsp
Label label_Table_DM = new Label(4, x, str, arialFormat); sheet.addCell(label_Table_DM); x++; } Label label_Table_DM1 = new Label(4, x, "", fontFormat2); sheet.addCell(label_Table_DM1);
//DataBase Connection For DM_MSGCOLDTLS
Connection connColdts =objDatabase.getConnection(); // PreparedStatement statementColdts = connColdts.prepareStatement("select * from DM_MSGCOLDTLS where DM_MSG_ID= '"+DM_MSG_ID+"' and HIDE_FLG='N' order By col_seq_no "); PreparedStatement statementColdts = connColdts.prepareStatement("select col.* from DM_MSGTBLDTLS tbl, dm_msgcoldtls col where col.DM_MSG_ID='"+DM_MSG_ID+"'and col.HIDE_FLG='N' and tbl.dm_msg_id = col.dm_msg_id and tbl.tbl_nm = col.tbl_nm order by tbl.tbl_lvl_no, col.col_seq_no"); ResultSet resultSetColdts = statementColdts.executeQuery();
Tip: If you're going to post more than a line or two of your code, wrap in a set aof UBB Code tags (there is a button on the edit screen to help you. This preserves your indenting which makes your code much easier to read.