upload images from jsp

Discussion in 'Java' started by chandu, Jul 6, 2006.

  1. chandu

    chandu Guest

    in my project administrator will upload images into data base.when user
    enters vth his id.the jsp file wil retrieve images and display.how can
    i achieve this .whethere i need to store location of image or something
    else.please help me in this regard
     
    chandu, Jul 6, 2006
    #1
    1. Advertisements

  2. chandu

    Oliver Wong Guest

    "chandu" <> wrote in message
    news:...
    > in my project administrator will upload images into data base.when user
    > enters vth his id.the jsp file wil retrieve images and display.how can
    > i achieve this .whethere i need to store location of image or something
    > else.please help me in this regard
    >


    You can either:

    (1) store the bytes of the image itself in the DB.
    (2) store it somewhere in the filesystem, and store its location in the
    DB.

    To give the image to the user:

    (1) Have the HTTP server respond to the URL request by connecting to the
    DB and returning the bytes of the image, instead of HTML data.
    (2a) Link directly to the file on the file system if the file is in a
    location that is shareable.
    (2b) Have the HTTP server respond to the URL request by reading from the
    file and returning the bytes of the image, instead of HTML data.

    - Oliver
     
    Oliver Wong, Jul 6, 2006
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Luis E Valencia

    Upload images and store in database?

    Luis E Valencia, May 19, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    392
    Cliff Harris
    May 19, 2004
  2. Shawn
    Replies:
    6
    Views:
    628
    =?Utf-8?B?Q2hyaXM=?=
    Mar 2, 2005
  3. news
    Replies:
    2
    Views:
    1,282
  4. =?Utf-8?B?U2FyYXY=?=

    Upload a file without file Upload control - ASP.Net

    =?Utf-8?B?U2FyYXY=?=, Aug 2, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    3,045
    Bruce Barker
    Aug 3, 2005
  5. Heather Fraser
    Replies:
    0
    Views:
    807
    Heather Fraser
    Jul 5, 2004
  6. Replies:
    0
    Views:
    4,936
  7. Replies:
    1
    Views:
    1,128
    Gabriel Genellina
    Nov 25, 2006
  8. Prakash
    Replies:
    3
    Views:
    634
    Ray at
    Nov 12, 2003
Loading...