Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Inserting & Retrieving Images from MSSQL

 
Ola Daniel
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am not really sure which forum this should go. Ill try here. I hope I get some direction. I am trying to create a page to upload images to a database and also view this when in the database on one of my JSPs. I am kind of lost. I would appreciate any direction on where to start from - like some kind of reference somewhere.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What part are you having trouble with:

  • Uploading the image?
  • Storing the image in the DB?
  • Reading the image from the DB?
  • Streaming the image to the browser via servlet?
  • Referencing the image in an image tag?
  • All of the above?


  • [ August 29, 2005: Message edited by: Bear Bibeault ]
     
    Ola Daniel
    Ranch Hand
    Posts: 105
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I am having trouble reading the Image from the database and streaming the image to the browser. This is the portion of the code that is to retrieve the image from the database.


    11:52:32,591 INFO [STDOUT] java.lang.NullPointerException
    11:52:32,591 INFO [STDOUT] ODD: java.lang.NullPointerException: null

    I am getting the above exception. Help please...

    The plan is to write the image from the DB to a file.png and then set an attribute that can be used by the image tag and display the picture on the jsp.
    [ August 30, 2005: Message edited by: Ola Daniel ]
     
    Ola Daniel
    Ranch Hand
    Posts: 105
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Guys problem solved.. my page is up an running
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic