You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Gus Heck <gu...@olin.edu> on 2003/12/02 00:51:10 UTC
html:link appears not to respect scriptlets inside atribute values
The following doesn't seem to be working as I would expect... I sort of
suspect that this may not be a struts issue, but I really thought you
were supposed to be able to drop in jsp expressions anywhere.
<html:link page="/prototypes/PopulateLocation.do?row=<%=
this.should.fail %>">Edit</html:link>
is giving me this html output:
<a href="/friendDB/prototypes/PopulateLocation.do?row=<%=
this.should.fail %>">Edit</a>
should fail as this.should.fail cannot exist, but it is getting
reproduced textually instead. I have this really bad feeling I am
forgetting something, or have missed something basic, but cant figure
out what searches would bring up the answer.
-Gus
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: html:link appears not to respect scriptlets inside atribute values
Posted by Kris Schneider <kr...@dotech.com>.
Per the JSP spec about request-time attribute values:
The expression must appear by itself (multiple expressions, and mixing
of expressions and string constants are not permitted).
Which means you have to use:
<html:link page='<%= "nasty" + "expression" + "here" %>'>Edit</html:link>
Gus Heck wrote:
> The following doesn't seem to be working as I would expect... I sort of
> suspect that this may not be a struts issue, but I really thought you
> were supposed to be able to drop in jsp expressions anywhere.
>
> <html:link page="/prototypes/PopulateLocation.do?row=<%=
> this.should.fail %>">Edit</html:link>
>
> is giving me this html output:
>
> <a href="/friendDB/prototypes/PopulateLocation.do?row=<%=
> this.should.fail %>">Edit</a>
>
> should fail as this.should.fail cannot exist, but it is getting
> reproduced textually instead. I have this really bad feeling I am
> forgetting something, or have missed something basic, but cant figure
> out what searches would bring up the answer.
>
> -Gus
--
Kris Schneider <ma...@dotech.com>
D.O.Tech <http://www.dotech.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org