• Post Reply Bookmark Topic Watch Topic
  • New Topic

Servelt file upload problem

 
chandana nalin
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jsp



Servlet



Chrom firefox browser given error. .java.io.FileNotFoundException: filename.xlsx (The system cannot find the file specified)


any idea
 
Dave Tolls
Ranch Hand
Posts: 2272
23
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't submit a filename and expect the server to find it as the server cannot access the file location...well, unless the browser and server are on the same machine.
It needs to be submitted as a multipart request (<- that's a link to a StackOverflow response that explains that part).  Essentially, the file is streamed as part of the request.

And on the server you need something that understands that sort of request.
Apache FileUpload is a useful tool for that side of things.
 
chandana nalin
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!