----- Original Message -----
From: "Wolfgang R�ckelein" <[EMAIL PROTECTED]>
To: "Tag Libraries Users List" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, April 25, 2002 2:19 AM
Subject: Re: Can't concatenate 2 strings together
> Hi,
>
> Martin Cooper wrote:
> > In JSTL, '+' is a numeric operator only. However, this will do what
> you
> > want:
> >
> > <c:import url="${viewPath}${assetForm.filename}"/>
>
> In this case this is a solution. However, having a concatening operator
> would be very helpful e.g. when you want to test the result e.g ${(x +
> y) == 'asdfasdfsdf')}.
Yes, I suppose it might be useful in some cases. The operator would have to
be something other than the '+' sign, though, since JSTL wouldn't know what
to do with an expression such as 'x + y' if both 'x' and 'y' were numeric
strings. (Should it add the numbers or concatenate the strings?)
You can still solve the problem you suggested, though, by using an
intermediate:
<c:set var="temp" value="${x}${y}"/>
<c:if test="${temp == 'asdfasdfsdf'}>
...
</c:if>
--
Martin Cooper
>
> Greetings,
> Wolfgang
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>