• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

File goes to wrong path when upload

 
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?
 
Marshal
Posts: 25812
69
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
 
You don't like waffles? Well, do you like this tiny ad?
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic