struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Arnott <>
Subject Re: status messages in <html:link> tag
Date Fri, 01 Apr 2005 09:04:00 GMT
Fumo, Vince wrote:
> ok follow-up and I'm sure this one will take 2 seconds to answer.. 
> part 1) is there a JSTL way to do the <bean:define>? 

Probably, but I've not used JSTL...

> part 2) What does it mean when the status message from the below code by Bob
> comes out as a literal (i.e.. <%=rollOverText%>) instead of the string it
> represents? I've checked the scriptlet outside of the tag and it outputs
> correctly. I'm thinking that the <html:link> tag isn't pre-processing the
> scriptlet?

Irt was off the top of my head I I realise that I made an error -

<bean:define id="rollOverText" type="java.lang.String">window.status='<bean:message
key="my.key" />'; return true;</bean:define>
<html:link href="" target="_blank" onmouseover="<%=rollOverText%>">...

Is what you want (I think)... You can't mix the <%= %> bit inside a string
within a tag attribute, if you get me. So attr="<%= ... %>" is okay, but
attr="string(<%= ... %>)" isn't.


Bob Arnott

Software Developer
Autonomy Systems Ltd.
Cambridge Business Park
Cowley Road

T: +44 (0) 1223 448 000
F: +44 (0) 1223 448 001

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message