What kind of object is that that you have stored in the database? A byte array[] of an image? Is it in a web-compatible format (GIF, JPEG, PNG)?
Either way, you can't do this in a JSP - you'll need a
servlet for it. JSPs can handle text, but not binary data. The JSP page that includes the image should have an image tag that has a "src" attribute pointing to the servlet that retrieves the image. The servlet would then stream the image data to the browser, setting the content type according to the image format. The
CodeBarn contains an example of how to do that.