This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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


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";
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";
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: CREATING A TEXT FILE from jsp ----- URGENT
It's not a secret anymore!