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. Advertising

  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. Advertising

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. =?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:
    2,434
    Bruce Barker
    Aug 3, 2005
  2. Heather Fraser
    Replies:
    0
    Views:
    621
    Heather Fraser
    Jul 5, 2004
  3. Replies:
    0
    Views:
    4,354
  4. Replies:
    1
    Views:
    924
    Gabriel Genellina
    Nov 25, 2006
  5. Prakash
    Replies:
    3
    Views:
    452
    Ray at
    Nov 12, 2003
Loading...

Share This Page