You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "vineesh . kumar" <vi...@rediffmail.com> on 2005/11/11 07:31:34 UTC

Bean write problem on emebedding an image

  
	

Hi all,
  I am trying to create a page, so that based on some crieterial the image to be displayed is selected.
So i made an Form bean in which i initialize a class array
and i am using logic itereate and bean write to display the image accordingly so i wrote

<lgic:iterate id="pollInfo" name="PollForm" property="pollInfo" scope="session">

<html:img src="<bean:write name="pollInfo" property="imgSrc" height="20" width="20"/>" />
<bean:write name="pollInfo" property="name"/>
</logic:iterate>
so i am getting an exception like,

      org.apacje.JasperException: /pages/status.jsp(26.50) equal symbol expected.
the error is on the line
<html:img src="<bean:write name="pollInfo" property="imgSrc" height="20" width="20"/>" />

what is the correct way of doing this


Re: Bean write problem on emebedding an image

Posted by Richard Yee <ry...@cruzio.com>.
Vineesh,
You are nesting the bean:write tag within a html:img tag. You can't nest 
the tags. Either don't use the html:img tag or replace the bean:write 
with a scriptlet <%= %>

-Richard


vineesh . kumar wrote:
>   
> 	
>
> Hi all,
>   I am trying to create a page, so that based on some crieterial the image to be displayed is selected.
> So i made an Form bean in which i initialize a class array
> and i am using logic itereate and bean write to display the image accordingly so i wrote
>
> <lgic:iterate id="pollInfo" name="PollForm" property="pollInfo" scope="session">
>
> <html:img src="<bean:write name="pollInfo" property="imgSrc" height="20" width="20"/>" />
> <bean:write name="pollInfo" property="name"/>
> </logic:iterate>
> so i am getting an exception like,
>
>       org.apacje.JasperException: /pages/status.jsp(26.50) equal symbol expected.
> the error is on the line
> <html:img src="<bean:write name="pollInfo" property="imgSrc" height="20" width="20"/>" />
>
> what is the correct way of doing this
>
>
>   



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


Re: Bean write problem on emebedding an image

Posted by Larry Meadors <lm...@apache.org>.
On 11 Nov 2005 06:31:34 -0000, vineesh . kumar
<vi...@rediffmail.com> wrote:
> <lgic:iterate id="pollInfo" name="PollForm" property="pollInfo" scope="session">

Was that just an email typo?

lgic:iterate instead of logic:iterate?

Larry

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


Re: Bean write problem on emebedding an image

Posted by am...@tcs.com.
Write 

<html:img src='<bean:write name="pollInfo" property="imgSrc" height="20" 
width="20"/>' />


Just replace the qotes.

Amitava Basak
ASE
Tata Consultancy Services Limited
Mailto: amitava.basak@tcs.com
Website: http://www.tcs.com

Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information.   If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited.   If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments.  Thank you