struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Schneider <k...@dotech.com>
Subject Re: html:link appears not to respect scriptlets inside atribute values
Date Tue, 02 Dec 2003 01:30:56 GMT
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 <mailto:kris@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


Mime
View raw message