Menu

Reading images from a dynamic URL

Help
2007-11-15
2013-03-22
  • Peter Carroll

    Peter Carroll - 2007-11-15

    This looks great but I can't seem to read an image that is pulled from a database as a blob. I think the problem is the parameters in the URL. I tries escaping the URL but no luck. Any suggestions?

    e.g.

    http://www.pcaucr.org/servlet/getblob?table=forum_images&id=17292&filename=101-0200_IMG.JPG

    coding the jsp like this:

    <jm:resize image="/servlet/getblob?table=forum_images&id=17292" width="120" height="80" smart="true"/>

    gets translated to:

    <img width="120" height="80" src="/jmage?image=/servlet/getblob?table=forum_images&id=17288&chain=org.jmage.filter.size.SmartResizeFilter&WIDTH=120&HEIGHT=80" id="0.6758736727375809"/>

    that URL is obviously invalid.

    Help!
    Thanks

     
    • Simon Mittag

      Simon Mittag - 2008-03-07

      Peter,

      I've been away from this project for a while, apologies for the late reply. Your ID parameter most likely collides with the html "id" attribute. Have you tried another attribute name?

      I suppose for making the DB work, you wrote your own ResourceFactory? So this should be under your control.

      I'll check the JSP Taghandler to see what's happening as well.

      Cheers,

      Simon

       

Log in to post a comment.

MongoDB Logo MongoDB