您好,欢迎来到[编程问答]网站首页   源码下载   电子书籍   软件下载   专题
当前位置:首页 >> 编程问答 >> Java >> 大家做的项目之中,有在项目中用过EL式的么?

大家做的项目之中,有在项目中用过EL式的么?

来源:网络整理     时间:2016/8/16 18:28:55     关键词:

关于网友提出的“ 大家做的项目之中,有在项目中用过EL式的么?”问题疑问,本网通过在网上对“ 大家做的项目之中,有在项目中用过EL式的么?”有关的相关答案进行了整理,供用户进行参考,详细问题解答如下:

问题: 大家做的项目之中,有在项目中用过EL式的么?
描述:

学习SJCWC的过程中,学了EL式。
感觉非常好用,原来特别费劲的东西,有的用EL式可以轻松做到。
但是,我做java的时间也不短了,做了好多项目,但是还从来没有什么项目中用过EL式。
不知道大家的项目中用得多么?为什么EL式用得少涅?有大鸟给俺说说?


解决方案1:

不用...

解决方案2:

EL相当地方便,在避免在jsp中使用java风格代码的同时,可以使代码变得简洁

解决方案3:

el==<% %>

解决方案4:

el el
<%%> Lj

解决方案5:

EL表达式------详解
基本用法:
 <>
                        class="MyBean"/>   
在EL表达式中等价为
 ${bean.name} 
EL中的错误显示:
${2/0} 
除数为零 显示为  infinity 
算术运算:
Addition: + 
Subtraction: − 
Multiplication: * 
Exponents: E 
Division: / or div 
Modulus: % or mod 
比较运算:
== or eq 
!= or ne 
< or lt 
> or gt 
<= or le 
>= or ge 
逻辑运算:
&& or and 
|| or or 
! or not 
其他运算符:
[ ] 
( ) 
− (unary) not ! empty 
* / div % mod 
+ − (binary)
< > <= >= lt gt le ge 
== != eq ne 
&& and 
|| or 
多个javabean嵌套:
${person.address[ 2 ].line1} 
隐式对象:
applicationScope:
This is a Map that contains all allications-scoped variables, The Map is keyed on the name of the variable.
cooike:
This is a Map that maps cookie namas to a single Cooike object. If mare than one cookie exists for a give name, then the first of these cookies is used for that name.
header:
This a Map that contains the values of each header name.
headerVlaues:
This a Map that maps a header name to a string array of all of the possible values for that header.
initParam:
This a Map that maps context initialization parameter names to their string parameter values.
pageContext:
The PageContext object.
pageScope  :
This is a Map that contains all page-scoped variables. The Map is keyed on the name of the variable.
param :
This is a Map that contains the names of the parameters to a page. Each paramter name is mapped to a single string values.
paramValus:
This is a Map that maps a parameter name to a string array of all of the values for that parameter.
requestScope:
This is a Map that contains all reqeust-scoped variables. The Map is keyed on the name of the variable.
sessionScope:
This is a Map that contains all session-scoped variables. The Map is keyed on the name of the variable.

解决方案6:

norwolfli(烟灰) ( ) 信誉:100    Blog   加为好友  2007-6-8 23:20:33  得分: 0  
 

我做个项目,前面显示基本上都这样写地。
。。。有你这么写的吗,还有这个恶心的 c:out ??
EL 很方便

解决方案7:

el方便但是不太好用,一般工具都不支持只能感知,要么功底扎实,否则写错了就over了

解决方案8:

还是模板好。

解决方案9:

用el和用<%=%>都差不多啊?都不是,el好像还要难看些,就像用了一大堆自定义标签,美工同样看不懂什么意思

解决方案10:

el,与美工们讨论的时候他们会有要求`

解决方案11:

避免在jsp页面中嵌套java代码,所以用el代替<%=%>
不过el的限制就是get开头的方法才能使用,要用一般的别的方法就要自己写标签了

解决方案12:

为什么要用 el 不用 <%=%>

解决方案13:

EL是jsp中的东西
JSTL也很多用的

解决方案14:

EL 要与 jstl 相结合用的 丹丹用 jstl 怎么过滤java 代码?!!!
jstl 是可以链接数据库 但我还真没发现有谁在 项目中用 
道理很简单 不安全
不过用 stuts 的话 是可以不用的

解决方案15:

只要做 JSP 就离不开 EL 表达式 在界面层去除 java 代码 就离不开这个

解决方案16:

el表达式用于显示确实方便 但 只是在jsp的隐式对象里面好用 地球人流行"<%= %>"

解决方案17:

我做过的东西中还没有不用el,包括模板的都有el形式的
PS:楼主,此帖结否?

解决方案18:

el很普通的东西  感觉都是用jstl
都是使用简单的东西  使用那些复杂的就会破坏MVC的模式
比如jstl里面可以在页面上面打开数据库
个人感觉这些东西 只需要一个关于显示的就够用了

解决方案19:

EL方便,好用。比其他标签好多了,跟其他的MVC框架配合,可以在JSP中不出现<% %>之类的东西。

解决方案20:

el绝对是个好东西,使用起来很方便.
但是 j2ee的容器支持不支持jsp 2.0又是个问题,所以我感觉容器支持的话,那就大胆的用好了,比写java代码强多了.

解决方案21:


我做个项目,前面显示基本上都这样写地。

解决方案22:

el太简单 用jstl


以上介绍了“ 大家做的项目之中,有在项目中用过EL式的么?”的问题解答,希望对有需要的网友有所帮助。
本文网址链接:http://www.codes51.com/itwd/3332815.html

相关图片

相关文章