You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Le Ngoc Lam <le...@yahoo.com> on 2003/04/25 04:17:50 UTC

How to dynamic create a image from a Form Bean

My form bean has attribute 
String src="http://www.mail-archive.com/logo.gif";
public void setSrc(String _src){
 this.src = src;
}
public String getSrc(){
 return this.src;
}

In JSP i put 
what attribute in "<html:img " can i put value src to
get this url.
I wish it will be 
<img src="http://www.mail-archive.com/logo.gif">
Thanks.
Lam.
 

__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: How to dynamic create a image from a Form Bean

Posted by Dan Tran <da...@hotmail.com>.
assume your form name in struts config file is "yourFormName" and you are
using Servlet 2.3 (ie Tomcat 4.x)

<html-el:img src="${yourFormName.src}" />

and readup on struts-el extention.

Hope this helps.

-D
----- Original Message ----- 
From: "Le Ngoc Lam" <le...@yahoo.com>
To: <st...@jakarta.apache.org>
Sent: Thursday, April 24, 2003 7:17 PM
Subject: How to dynamic create a image from a Form Bean


> My form bean has attribute
> String src="http://www.mail-archive.com/logo.gif";
> public void setSrc(String _src){
>  this.src = src;
> }
> public String getSrc(){
>  return this.src;
> }
>
> In JSP i put
> what attribute in "<html:img " can i put value src to
> get this url.
> I wish it will be
> <img src="http://www.mail-archive.com/logo.gif">
> Thanks.
> Lam.
>
>
> __________________________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo
> http://search.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org