This week's giveaway is in the Java/Jakarta EE forum.
We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line!
See welcome thread
Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

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";
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";
TlrLine = "T"+amount_r.size()+total_Amount_r+"\r\n";
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!