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

herozc 2007-06-07 01:44:17
学习SJCWC的过程中,学了EL式。
感觉非常好用,原来特别费劲的东西,有的用EL式可以轻松做到。

但是,我做java的时间也不短了,做了好多项目,但是还从来没有什么项目中用过EL式。

不知道大家的项目中用得多么?为什么EL式用得少涅?有大鸟给俺说说?
...全文
675 37 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
37 条回复
切换为时间正序
请发表友善的回复…
发表回复
blooney 2007-08-17
  • 打赏
  • 举报
回复
学习
herozc 2007-06-14
  • 打赏
  • 举报
回复
up
ERPCoder 2007-06-13
  • 打赏
  • 举报
回复
不用...
likgui 2007-06-13
  • 打赏
  • 举报
回复
关注
HaoyuTan 2007-06-13
  • 打赏
  • 举报
回复
EL相当地方便,在避免在jsp中使用java风格代码的同时,可以使代码变得简洁
  • 打赏
  • 举报
回复
EL方便,好用。比其他标签好多了,跟其他的MVC框架配合,可以在JSP中不出现<% %>之类的东西。
Squall1009 2007-06-13
  • 打赏
  • 举报
回复
el绝对是个好东西,使用起来很方便.
但是 j2ee的容器支持不支持jsp 2.0又是个问题,所以我感觉容器支持的话,那就大胆的用好了,比写java代码强多了.
herozc 2007-06-13
  • 打赏
  • 举报
回复
EL呀EL
herozc 2007-06-12
  • 打赏
  • 举报
回复
有大项目中用的么?
fireflyc 2007-06-11
  • 打赏
  • 举报
回复
还是模板好。
jackson416 2007-06-11
  • 打赏
  • 举报
回复
el==<% %>
lv810 2007-06-11
  • 打赏
  • 举报
回复
el el
<%%> Lj
pablo3518 2007-06-11
  • 打赏
  • 举报
回复
EL表达式------详解
基本用法:
<jsp:useBean id="bean"
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.
yycxx 2007-06-11
  • 打赏
  • 举报
回复
norwolfli(烟灰) ( ) 信誉:100 Blog 加为好友 2007-6-8 23:20:33 得分: 0

<c:out value="${userVO.userName}" />
我做个项目,前面显示基本上都这样写地。

。。。有你这么写的吗,还有这个恶心的 c:out ??

EL 很方便
opensky010 2007-06-11
  • 打赏
  • 举报
回复
el方便但是不太好用,一般工具都不支持只能感知,要么功底扎实,否则写错了就over了
herozc 2007-06-11
  • 打赏
  • 举报
回复
LS
这倒是。。。
  • 打赏
  • 举报
回复
自己的tag,值从哪里传?
你要用<%=%>就免不了往页面里写代码,而且你在form标签里写action="<%=request.getContextPath%>/aaa...."看看报不报错?el才是解决之道。
herozc 2007-06-11
  • 打赏
  • 举报
回复
一般都是有自己的tag而不用EL吧?
Carrey_Amy 2007-06-10
  • 打赏
  • 举报
回复
el,与美工们讨论的时候他们会有要求`
magus163 2007-06-10
  • 打赏
  • 举报
回复
用el和用<%=%>都差不多啊?都不是<html>,el好像还要难看些,就像用了一大堆自定义标签,美工同样看不懂什么意思
加载更多回复(17)

67,550

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧