• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Does File Uploading in Struts ignore Tab characters

 
sravani jetty
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic