el很普通的东西 感觉都是用jstl都是使用简单的东西 使用那些复杂的就会破坏MVC的模式比如jstl里面可以在页面上面打开数据库个人感觉这些东西 只需要一个关于显示的就够用了
解决方案 »
- js掌握到什么程度算NB
- log4j怎么用
- struts2 如果一个页面上的参数为"",如何让其自动封装到action的参数值为null而不是""
- hibernate 自增主键冲突问题
- hibernate 的一个one-to-one级联最简单的例子居然报错,请大家帮我看看。谢谢了
- ibatis的sqlmap中的like查询查询不出来数据,急急急急!!!
- 请问:通过会话Bean访问有关联的实体Bean时(多个实体Bean之间存在关联),怎样进行添加修改删除操作?
- one to many relationship in three table
- 我想到IBM下载WebSphere Studio Workbench注册的半天,用用户号和密码就是进不去!!!郁闷啊!
- 有大牛对JMAIL熟悉的么-这个软件用jmail从我的QQ邮箱中下载邮件~但是一直都连不上服务器,都说是connection timeout
- oracle中的问题
- 这个过滤器有错误吗?
PS:楼主,此帖结否?
----------------------------------------------------------------------------
错,不是地球人,是菜鸟。你看用struts、spring的标签里出现你那丑陋的jsp表达式了吗?
----------------------------------------------------------
都是比较大的项目么?采用什么结构的?面向欧美,或者日本等国外的项目么?
jstl 是可以链接数据库 但我还真没发现有谁在 项目中用
道理很简单 不安全
不过用 stuts 的话 是可以不用的
JSTL也很多用的
我做个项目,前面显示基本上都这样写地。
不过el的限制就是get开头的方法才能使用,要用一般的别的方法就要自己写标签了
你要用<%=%>就免不了往页面里写代码,而且你在form标签里写action="<%=request.getContextPath%>/aaa...."看看报不报错?el才是解决之道。
<c:out value="${userVO.userName}" />
我做个项目,前面显示基本上都这样写地。有你这么写的吗,还有这个恶心的 c:out ??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.
但是 j2ee的容器支持不支持jsp 2.0又是个问题,所以我感觉容器支持的话,那就大胆的用好了,比写java代码强多了.