tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Felipe Leme" <>
Subject Re: [Fwd: Having an expression in an set tag]
Date Sat, 05 Jul 2003 18:51:45 GMT
On Saturday 05 July 2003 06:48 am, shanmugampl |jakarta|

><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.

Yes, you did. You tried to add 2 Strings, while you should just concatenad them inside the
value parameter (without using EL). 

By the way, this is a typical mistake (it took me hours to figure it out the first time I
got that error:). The right code should be something like: 

<c:set var="link" value="${request.requestURL$}?nodeClicked=${NODEID}&firstChild=true"/>

(but as someone already pointed out, you should use the <c:url> in these situations)


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

View raw message