aspose file tools*
The moose likes Struts and the fly likes Does File Uploading in Struts ignore Tab characters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Does File Uploading in Struts ignore Tab characters" Watch "Does File Uploading in Struts ignore Tab characters" New topic
Author

Does File Uploading in Struts ignore Tab characters

sravani jetty
Ranch Hand

Joined: Jun 06, 2007
Posts: 38
Hi,

I am uploading a Tab delimited file and I am using below code to get the file



And I am using below code to read the file and parse data



String tokenizer length returns me one

The file I am uploading contains the below data

ABC DEF GHI 123 qwe

I have tab space between these columns.

When i break the string using String Tokenizer using "\t" it returns me the entire line without breaking it. I wrote a plain java class and tested this which works fine so I think is there any issue with FormFile in struts that just ignores tab spaces.

Any suggestions are much appreciated

Thanks
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Check the request that's actually being sent (like with Firebug or a proxy etc.) -- I'm skeptical that the file contents would be modified by struts or commons-fileupload, but I suppose it's possible.
 
wood burning stoves
 
subject: Does File Uploading in Struts ignore Tab characters