T*****e 发帖数: 361 | 1 It seems that EL is trying hard to convert my strings to double values. I
am confused. I remember the plus operator (+) can be used to concatenate
strings. Did I do anything wrong? What's the better way to deal with this?
I am using Tomcat 5.5.17 and JDK 1.5.0_06 on WinXP Home.
Thanks.
1: Working code
<%
String resourceType = "service";
pageContext.setAttribute("resourceType", resourceType);
pageContext.setAttribute("resourceName", resourceType + "Name");
%>
select
ri.${resour | m******t 发帖数: 2416 | 2 Nope, + does not concatenate two strings in EL. There isn't any way to
concatenate two strings within the ${} scope, not that I know of. I know, it
's surprisingly stupid. | g*****g 发帖数: 34805 | 3 Right, you can't do that. But you can do
it
【在 m******t 的大作中提到】 : Nope, + does not concatenate two strings in EL. There isn't any way to : concatenate two strings within the ${} scope, not that I know of. I know, it : 's surprisingly stupid.
| T*****e 发帖数: 361 | 4 Thanks. This is a solution.
However, not being able to concatenate strings within EL makes simple things
more difficult and less straightforward. I agree with magicfat that this
is stupid. Anyway, I am not that smart either and I can live with it :)
【在 g*****g 的大作中提到】 : Right, you can't do that. But you can do : : : it
|
|