You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by shanmugampl <sh...@india.adventnet.com> on 2003/07/05 11:48:54 UTC

[Fwd: Having an expression in an set tag]


Re: [Fwd: Having an expression in an set tag]

Posted by Jason Lea <ja...@kumachan.net.nz>.
You can use the <c:url> JSTL tag

eg something like this...

<c:url var="link" value="${request.getRequestURL()}">
     <c:param name="nodeclicked" value="${NODEID}"/>
     <c:param name="firstChild" value="true"/>
</c:url>

--jason


shanmugampl wrote:
> 
> 
> ------------------------------------------------------------------------
> 
> Subject:
> Having an expression in an set tag
> From:
> shanmugampl <sh...@india.adventnet.com>
> Date:
> Sat, 05 Jul 2003 15:16:06 +0530
> To:
> taglibs-user <ta...@jakarta.apache.org>
> 
> 
> Hi All,
> 
>        I used to construct a link as follows
> 
> <%
> String link = request.getRequestURL() + "?nodeclicked=" + NODEID + 
> "&firstChild=true";
> %>
> 
>        I want to replace this with the set tag. I tried it as follows
> 
> *<c:set var="link" value="${request.requestURL + '?nodeClicked=' + 
> NODEID + '&firstChild=true'}"/>*
> 
>     but this is not working. I am getting the following an error
> 
> An exception occured trying to convert String "?nodeClicked" to type "java.lang.Double"
> 
>  Have i done anything wrong in writing the expression.
> 
> Thanks
> Shanmugam PL 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


-- 
Jason Lea


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org