You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by teknokrat <te...@yahoo.com> on 2003/05/15 12:48:54 UTC
How do i nest quotes in struts??
I need to do something like <html:link page="<bean:write name="bean"
property="link"/>"></html:link>
No matter ho i do this - changing "->' or escaping quote using \" - I
cannot get this to work. How can this be done??
thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: How do i nest quotes in struts??
Posted by Mark Galbreath <ma...@qat.com>.
I don't think Struts tags will accept a single quote enclosing an attribute
value. But there is nothing wrong with page="<%= id %>", anyway.
Mark
-----Original Message-----
From: Alessio [mailto:modena@dit.unitn.it]
Sent: Thursday, May 15, 2003 7:09 AM
To: Struts Users Mailing List; teknokrat@yahoo.com
Subject: Re: How do i nest quotes in struts??
use:
<bean:define id="id" name="bean" property="link" type="java.lang.String" />
<html:link page='<%=id%>'>link</html:link>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: How do i nest quotes in struts??
Posted by Alessio <mo...@dit.unitn.it>.
use:
<bean:define id="id" name="bean" property="link" type="java.lang.String" />
<html:link page='<%=id%>'>link</html:link>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: How do i nest quotes in struts??
Posted by Mark Lowe <ma...@talk21.com>.
you can't nest tags. jstl provides an alternative way of dealing with
this but you're looking for but i'll stick to the struts tags for
this...
<html:link page="<%= bean.getLink() %>" />
or if you've the link stored in a map
<html: page="<%= bean.get("link") %>" />
or if you set a property called link in a servlet (action) e.g.
request.setAttribute("link","http://foo.com");
<html:link page="<%= link %> />
if you don't like scriptlets and you don't need a session maintaining
<a href="<bean:write name="bean" property="link" />">
hope this helps
mark
Giovedì, 15 mag 2003, alle 11:48 Europe/London, teknokrat ha scritto:
> I need to do something like <html:link page="<bean:write name="bean"
> property="link"/>"></html:link>
>
> No matter ho i do this - changing "->' or escaping quote using \" - I
> cannot get this to work. How can this be done??
>
>
>
> thanks
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org