Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CREATING A TEXT FILE from jsp ----- URGENT

 
mou haj
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please help...
i will have to create a text file from a table data
say i hace name and address i select then from data base
and want to paste then in the txt file say 1 to 50 name 51 to 100 address.
but when im trying to write say name mou address japan
it is writing as moujapan
but i want it as mou japan ie japan starting from 51st position
my code goes some what like this
************************
String uploadPath1 = uploadPath+"\\ReconPlus\\ERECONAR.TXT";
FileWriter ARFileFileWriter = new FileWriter(uploadPath1);
HdrLine = "H"+arrival_Date_r.elementAt(1)+arrival_Time_r.elementAt(1)+baseNumber+userID+"\r\n";
ARFileFileWriter.write(HdrLine);
for(int j=0; j<amount_r.size(); j++) {
DataLine = "D"+erecon_Sr_No_r.elementAt(j)+romaji_Name_r.elementAt(j)+kana_Name_r.elementAt(j)+amount_r.elementAt(j)+value_Date_r.elementAt(j)+cut_off_date_r.elementAt(j)+cust_Ref_No_r.elemen tAt(j)+debit_Credit_r.elementAt(j)+"\r\n";
ARFileFileWriter.write(DataLine);
}
TlrLine = "T"+amount_r.size()+total_Amount_r+"\r\n";
ARFileFileWriter.write(TlrLine);
ARFileFileWriter.close();
************************************************
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic