You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by an...@claire.co.jp on 2001/12/17 05:05:11 UTC

Re: dynamic images

Thanks for the reply. You cay I will most likley not want to serve the 
images from the database, where do you suggest I serve them from?  In my 
case I am not using Apache, so I cannot serve them with Apache.

Cheers

Tony

> I'd recommend a custom tag for URL's that get pulled from the DB for a
> couple of reasons - it probably won't be long before you'll want to offload
> them from serving directly from the DB, so the URL could switch, scriptlets

> are *bad* (in a Struts environment).  You'll want to direct the URL to a
> servlet that reads it from the DB and serves up the proper MIME type.
> 
> We did this in my last extensive Struts endeavor and made the URL's part of
> a properties file so that for development purposes they could serve straight
> from a DB accessing servlet, and in a production environment the URL's
> generated were being served directly from Apache and the images got
> automatically pulled to static files from the DB when they did not exist in
> the "cache".

> 
>     Erik
> 
> p.s. And no, you can't nest taglibs like that.  :)
> 
> 
> ----- Original Message -----
> From: "Sean Owen" <sr...@yahoo.com>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Cc: <ch...@columbusgroup.com>
> Sent: Friday, November 23, 2001 3:35 AM
> Subject: Re: dynamic images
> 
> 
> 
>>I think you will need to do this:
>>
>><html:img src="<%=card.getImageLink()%>" ...
>>
>>As far as I know you can't nest tags like this. If someone has a better
>>
> way
> 
>>I'd like to see it!
>>
>>Sean
>>
>>
>>----- Original Message -----
>>From: "Henrick Chua" <ch...@columbusgroup.com>
>>To: "Struts Users Mailing List (E-mail)" <st...@jakarta.apache.org>
>>Sent: Thursday, November 22, 2001 6:58 PM
>>Subject: dynamic images
>>
>>
>>
>>>Hi!
>>>
>>>how can I display images whose source URL comes from the database? and
>>>
> how
> 
>>>can I display it's corresponding alt property?
>>>
>>>I keep getting an error message on this code:
>>>
>>><html:img src="<bean:write name="card" property="imageLink">"
>>>
>>width="168.5"
>>
>>>height="88" border="1"  align="texttop" alt ="bean:write name="card"
>>>property="imageDescription" />
>>>
>>>thanx.
>>>
>>>h




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>