Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

File goes to wrong path when upload  RSS feed

 
nina nan
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried to upload one file and it will save in the pc drive. But it failed to save in the correct path.

upload.jsp


uploaddownloadservlet.java


web.xml


filelocationcontextlistener.java


This is part of my coding involve in uploading and downloading files. Anyone knows why it goes to default upload path when I already create path for the file to be stored in E drive in pc?
 
Paul Clapham
Sheriff
Posts: 22374
42
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I ran out of patience trying to go through all of that code, so could you help out by pointing at the code which you think is supposed to set the upload folder's name?

And by the way, hopefully you are looking on the server for the uploaded file and not on the client.

Also it would help if you clarified whether "it failed to save in the correct path" means that it was saved in some other path, or whether it wasn't saved at all (or you couldn't find where it was saved).
 
nina nan
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:I ran out of patience trying to go through all of that code, so could you help out by pointing at the code which you think is supposed to set the upload folder's name?

And by the way, hopefully you are looking on the server for the uploaded file and not on the client.

Also it would help if you clarified whether "it failed to save in the correct path" means that it was saved in some other path, or whether it wasn't saved at all (or you couldn't find where it was saved).


sorry. The file supposed to save in the E drive. I am looking on the server as it supposed to save in the E drive. It goes to C:\Apache.... which is the default path as I use common Fileupload. So, it save to other path but I cannot retrieve or download the file that has been uploaded as it in other path now.

Sysconstant.java


I put in other java file
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!