That symptom usually indicates that you forgot to import the bean taglib.
Dave Weis's suggestion is correct.  I do similar stuff all the time, e.g.:

   <link rel="stylesheet" type="text/css" href="<html:rewrite
forward="forward.stylesheet"/>">

(This works because the JSP parser doesn't care about the HTML markup...HTML
tags and JSP tags may look the same to humans, but not to the parser :)

If the taglib import isn't the problem, maybe we can figure something out if
you post the entire source for the page.

chris

> -----Original Message-----
> From: Andy Kriger [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 19, 2002 3:03 PM
> To: Struts Users Mailing List
> Subject: RE: dynamic img src attribute
> 
> 
> When I tried something like that, the <bean:write .../> 
> string ended up in
> my HTML img src - it wasn't interpreted (that is what I'd 
> expect to happen
> since XML isn't supposed to have tags w/in tags and JSPs are 
> supposed to
> conform to XML)
> 
> -----Original Message-----
> From: Dave Weis [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 19, 2002 16:04
> To: Struts Users Mailing List
> Subject: RE: dynamic img src attribute
> 
> 
> 
> On Thu, 19 Sep 2002, Andy Kriger wrote:
> > That is neat - but I'm not talking about query parameters. 
> I'm talking
> about
> > the src string itself.
> 
> <img src="<bean:write name="BEAN" property="property"/>">
> 
> should do it.
> 
> dave
> 
> > >I tried asking this few days ago when my understanding of 
> struts was
> > >significantly less than it is now (and I didn't phrase my 
> question very
> > well
> > >at that).
> > >
> > >Here's what I'd like to do...
> > ><img src='<dynamically generated path stored in a bean>' />
> > >with the constraint that I'd like to avoid the <% %> 
> syntax (i want to
> keep
> > >the JSP free of these things completely for the sake of the content
> > >generating folks that don't know Java/JSP code).
> > >
> > >Is there a struts taglib or other taglib that allows you 
> to do something
> > >like...
> > ><img>
> > >   <param name='src' bean='myBean' property='beanProp' 
> scope='beanScope'>
> > ></img>
> --
> Dave Weis             "I believe there are more instances of 
> the abridgment
> [EMAIL PROTECTED]   of the freedom of the people by gradual 
> and silent
>                       encroachments of those in power than by violent
>                       and sudden usurpations."- James Madison
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to