由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - Question on JSP EL
相关主题
[合集] How to check whether a file is locked?[转载] JSP access database的问题
问个可能比较奇怪的弱问题请问JSP里这个怎么设
Re: 一个最近完成的JAVA项目的反思。JSP菜鸟一问
Java Http Question?关于Jsp timeout
问个J2EE server跟Apache Web Server的问题?问一个J2EE和Tomcat问题
JSP and TOMCAT 问题有没有人熟悉tomcat?急!
请问现在最常用的开放SSL平台是什么J2EE和未来工作问题
where is my j2ee.jar filesession lost between JSP and Struts
相关话题的讨论汇总
话题: el话题: strings话题: question
进入Java版参与讨论
1 (共1页)
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

1 (共1页)
进入Java版参与讨论
相关主题
session lost between JSP and Struts问个J2EE server跟Apache Web Server的问题?
question about using Runtime.getRuntime.exec() in TomcatJSP and TOMCAT 问题
tomcat 快要把我逼疯了, 高手帮忙。请问现在最常用的开放SSL平台是什么
start up tomcat problemwhere is my j2ee.jar file
[合集] How to check whether a file is locked?[转载] JSP access database的问题
问个可能比较奇怪的弱问题请问JSP里这个怎么设
Re: 一个最近完成的JAVA项目的反思。JSP菜鸟一问
Java Http Question?关于Jsp timeout
相关话题的讨论汇总
话题: el话题: strings话题: question