Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts file upload (Encoding issue)

 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I am trying to upload a file using FormFile.So it creates a temporary file in the server.To get the bytes of that file I can use FormFile.getFileData().Can anyone tell me what would be the encoding of those bytes.Will that be UTF-8 or encoding from the OS(that is System.getProperty("file.encodign")).
 
Brent Sterling
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmmm...maybe I am missing out on something but I have used FormFile several times to upload binary and text files and store them either in an Oracle database or as a file on a Solaris based server and I never had to worry about byte encoding. Are you seeing problems?

- Brent
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic