• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Upload Files in User Defined Directories/Database

 
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good day!

I have here a code that uploads multiple files. However, it just puts the file in the directory where my application resides.

I have tried to insert a code that uses mkdir and mkdirs but it didn't work.

Please give me an idea on how to upload it to a User Defined directory or in a Database.

Thanks.

Here's the code:

 
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Dada,


I have tried to insert a code that uses mkdir and mkdirs but it didn't work.



Did you get any error-message?

Herman
PS You have a lot of Java-code in your JSP, and you don't catch or log any exceptions, both mean you will get problems.
 
Darren Alexandria
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
mkdir and mkdirs are not recognized. That's my error.

Yes, I am planning to transfer my code to a servlet. I just made these for testing purposes.

Thanks so much.
 
Darren Alexandria
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply.

I have solved the error by using this code:




Thanks Again!

God Bless you.
 
reply
    Bookmark Topic Watch Topic
  • New Topic