Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2010
    Posts
    19
    Rep Power
    0

    Default upload file from local system to database

    Hi all,

    I have requirement that i have to upload a file from the local system to database. I got the technique to save the file data to the database. i am using eclipse for development. i have a jsp page where i have file upload option. when i select a file from the local system , i am passing this file path to the sevlet to read from the file and save it in the database. when i read from the path specified it is telling file not found. when i came to that the default path is set to the eclipse home directory. if i select the file from eclipse home directory my servlet is reading the file , when i select file from some other location it is not reading. what i have to do to solve this problem. please help me on this.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default

    i am passing this file path to the sevlet to read from the file
    Is all the code executing on the same PC?
    Is the path a full path including the drive letter?

  3. #3
    Join Date
    Apr 2010
    Posts
    19
    Rep Power
    0

    Default upload file from local system to database

    hi ,

    The code is in the remote server. yes i am passing full path(including the driver letter).

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,863
    Rep Power
    19

    Default

    Um.
    Pass the file to the servlet, not the path.

    You upload a file to a servlet, you don't pass the path and then hope the server the servlet is sitting on can see it.

Similar Threads

  1. File upload into database using Hibernate
    By liljejalil in forum JDBC
    Replies: 1
    Last Post: 02-28-2010, 03:11 AM
  2. :large file upload to server(chunk upload)
    By tommy_725 in forum Networking
    Replies: 0
    Last Post: 10-16-2009, 12:21 AM
  3. Accesing database(Access) from a local machine
    By ersachinjain in forum JDBC
    Replies: 0
    Last Post: 08-14-2009, 05:09 PM
  4. upload excel file into database
    By bhasker4 in forum Introductions
    Replies: 1
    Last Post: 07-13-2009, 09:13 PM
  5. How to read xml file located in local system using Java
    By java_kick in forum Advanced Java
    Replies: 2
    Last Post: 04-06-2009, 11:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •