File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes CREATING A TEXT FILE from jsp ----- URGENT Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "CREATING A TEXT FILE from jsp ----- URGENT" Watch "CREATING A TEXT FILE from jsp ----- URGENT" New topic
Author

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

mou haj
Ranch Hand

Joined: Sep 12, 2001
Posts: 81
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();
************************************************
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: CREATING A TEXT FILE from jsp ----- URGENT