Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Java EE 综合讨论区 » Lomboz  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 lomboz3.01不支持jstl中的el?
alin_ass





发贴: 183
积分: 0
于 2004-09-15 19:41 user profilesend a private message to usersend email to alin_asssearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
如在这里:
<c:forEach items="${status.errorMessages}" var="error">
出错:
JSP Parsing Error: According to TLD or attribute directive in tag file, attribute items does not accept any expressions

但是单纯的el还是支持的

奇怪,请大家帮助我,3ks



叫我包子
作者 Re:lomboz3.01不支持jstl中的el? [Re:alin_ass]
lifangning





发贴: 98
积分: 0
于 2004-09-15 23:44 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
不支持1.0版本,只支持1.1以上。


作者 Re:lomboz3.01不支持jstl中的el? [Re:alin_ass]
alin_ass





发贴: 183
积分: 0
于 2004-09-16 01:00 user profilesend a private message to usersend email to alin_asssearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我换成1.1.1的还是同样错误


叫我包子
作者 Re:lomboz3.01不支持jstl中的el? [Re:alin_ass]
Benimas





发贴: 4
积分: 0
于 2004-09-16 17:05 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
这个和lomboz3.01有关系么~
好像是和Tomcat有关系啊~

我用的是Tomcat5.0,不知道为什么EL不能使用...

是不是在使用EL的时候web.xml还要怎么配置一下?



作者 Re:lomboz3.01不支持jstl中的el? [Re:alin_ass]
alin_ass





发贴: 183
积分: 0
于 2004-09-16 22:31 user profilesend a private message to usersend email to alin_asssearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
上铺兄弟,我是在eclipse里编辑有问题


叫我包子
作者 Re:lomboz3.01不支持jstl中的el? [Re:alin_ass]
alin_ass





发贴: 183
积分: 0
于 2004-09-16 23:18 user profilesend a private message to usersend email to alin_asssearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
嘿嘿,该问题已解决,谁要知道拿xmlbuddy pro2.11的key来qq42333899,恭候大驾


叫我包子
作者 Re:lomboz3.01不支持jstl中的el? [Re:alin_ass]
alin_ass





发贴: 183
积分: 0
于 2004-09-16 23:19 user profilesend a private message to usersend email to alin_asssearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
to benimas:

el 你按照 webapps/jsp-examples里的web.xml定义<web-app>的scheme就可以了



叫我包子
作者 Re:lomboz3.01不支持jstl中的el? [Re:alin_ass]
Benimas





发贴: 4
积分: 0
于 2004-09-17 09:22 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
to:alin_ass
我有一个问题想请教你

我在JSP中用EL不能使用
-----------[code]-----------------
<html>
<head>
<title>JSP 2.0 Expression Language - Basic Comparisons</title>
</head>
<body>
<h1>JSP 2.0 Expression Language - Basic Comparisons</h1>
<hr>
This example illustrates basic Expression Language comparisons.
The following comparison operators are supported:
<ul>
<li>Less-than (< or lt)</li>
<li>Greater-than (> or gt)</li>
<li>Less-than-or-equal (<= or le)</li>
<li>Greater-than-or-equal (>= or ge)</li>
<li>Equal (== or eq)</li>
<li>Not Equal (!= or ne)</li>
</ul>
<blockquote>
<u><b>Numeric</b></u>
<code>
<table border="1">
<thead>
   <td><b>EL Expression</b></td>
   <td><b>Result</b></td>
   </thead>
   <tr>
   <td>\${1 < 2}</td>
   <td>${1 < 2}</td>
   </tr>
   <tr>
   <td>\${1 lt 2}</td>
   <td>${1 lt 2}</td>
   </tr>
   <tr>
   <td>\${1 > (4/2)}</td>
   <td>${1 > (4/2)}</td>
   </tr>
   <tr>
   <td>\${1 > (4/2)}</td>
   <td>${1 > (4/2)}</td>
   </tr>
   <tr>
   <td>\${4.0 >= 3}</td>
   <td>${4.0 >= 3}</td>
   </tr>
   <tr>
   <td>\${4.0 ge 3}</td>
   <td>${4.0 ge 3}</td>
   </tr>
   <tr>
   <td>\${4 <= 3}</td>
   <td>${4 <= 3}</td>
   </tr>
   <tr>
   <td>\${4 le 3}</td>
   <td>${4 le 3}</td>
   </tr>
   <tr>
   <td>\${100.0 == 100}</td>
   <td>${100.0 == 100}</td>
   </tr>
   <tr>
   <td>\${100.0 eq 100}</td>
   <td>${100.0 eq 100}</td>
   </tr>
   <tr>
   <td>\${(10*10) != 100}</td>
   <td>${(10*10) != 100}</td>
   </tr>
   <tr>
   <td>\${(10*10) ne 100}</td>
   <td>${(10*10) ne 100}</td>
   </tr>
  </table>
</code>
<br>
<u><b>Alphabetic</b></u>
<code>
<table border="1">
<thead>
   <td><b>EL Expression</b></td>
   <td><b>Result</b></td>
   </thead>
   <tr>
   <td>\${'a' < 'b'}</td>
   <td>${'a' < 'b'}</td>
   </tr>
   <tr>
   <td>\${'hip' > 'hit'}</td>
   <td>${'hip' > 'hit'}</td>
   </tr>
   <tr>
   <td>\${'4' > 3}</td>
   <td>${'4' > 3}</td>
   </tr>
  </table>
</code>
</blockquote>
</body>
</html>
------------[runing]--------------------
This example illustrates basic Expression Language comparisons. The following comparison operators are supported:
Less-than (< or lt)
Greater-than (> or gt)
Less-than-or-equal (<= or le)
Greater-than-or-equal (>= or ge)
Equal (== or eq)
Not Equal (!= or ne)
Numeric EL Expression Result
${1 < 2} ${1 < 2}
${1 lt 2} ${1 lt 2}
${1 > (4/2)} ${1 > (4/2)}
${1 > (4/2)} ${1 > (4/2)}
${4.0 >= 3} ${4.0 >= 3}
${4.0 ge 3} ${4.0 ge 3}
${4 <= 3} ${4 <= 3}
${4 le 3} ${4 le 3}
${100.0 == 100} ${100.0 == 100}
${100.0 eq 100} ${100.0 eq 100}
${(10*10) != 100} ${(10*10) != 100}
${(10*10) ne 100} ${(10*10) ne 100}
-----------------------------------------

运行后用到El的地方都不能显示
eg:第一行 ${1 < 2} ${1 < 2}
正常显示应该是 ${1<2} true
却没被正常显示出来

--------我的web.xml如下---------------------
<?xml version="1.0" ?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

<!-- Copyright (c) 2002 by ObjectLearn. All Rights Reserved. -->
<web-app>

  <!-- Remove the comments below to define a servlet. -->
  <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
  <!-- <servlet> -->
  <!-- <servlet-name>MyServlet</servlet-name> -->
  <!-- <servlet-class>examples.MyServlet</servlet-class> -->
  <!-- <init-param> -->
  <!-- <param-name>myparam</param-name> -->
  <!-- <param-value>12345</param-value> -->
  <!-- </init-param> -->
  <!-- </servlet> -->
  <!-- -->
  <!-- -->
  <!-- <servlet-mapping> -->
  <!-- <servlet-name>MyServlet</servlet-name> -->
  <!-- <url-pattern>/mine/*</url-pattern> -->
  <!-- </servlet-mapping> -->
  <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

  <jsp-config>
    <taglib>
      <taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>
      <taglib-location>/WEB-INF/tld/c.tld</taglib-location>
    </taglib>
  </jsp-config>
  
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>

  <error-page>
    <error-code>404</error-code>
    <location>/error.jsp</location>
  </error-page>

</web-app>
----------------------------
请教一下是不是web.xml配置有问题?
我把jsp-examples的web.xml复制到我的web.xml中站台就不能strat了
请问应该怎么配置?



作者 Re:lomboz3.01不支持jstl中的el? [Re:alin_ass]
errorter





发贴: 114
积分: 2
于 2004-09-17 10:10 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
"<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">"

EL 是在JSP 2.0 中正式纳入规范的
所以用 web.xml 使用2.4的 Schema 而不是2.3的DTD



作者 Re:lomboz3.01不支持jstl中的el? [Re:alin_ass]
Benimas





发贴: 4
积分: 0
于 2004-09-17 11:12 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
谢谢楼上的.
----------我现在web.xml改为------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd"
version="2.4">

  <jsp-config>
    <taglib>
      <taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>
      <taglib-location>/WEB-INF/tld/c.tld</taglib-location>
    </taglib>
  </jsp-config>
  
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>

  <error-page>
    <error-code>404</error-code>
    <location>/error.jsp</location>
  </error-page>

</web-app>
-----------------------------------------
问题解决了>_<
楼上和楼主都好人,偶新手,以后多指教


Benimas edited on 2004-09-17 11:24

作者 Re:lomboz3.01不支持jstl中的el? [Re:alin_ass]
alin_ass





发贴: 183
积分: 0
于 2004-09-17 13:02 user profilesend a private message to usersend email to alin_asssearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
jstl taglib 不用在web.xml指定的,另外,jstl1.1.1在lomboz3.01中表现正常,jstl1.06有el问题


叫我包子
作者 Re:lomboz3.01不支持jstl中的el? [Re:alin_ass]
chengbd



版主


发贴: 687
积分: 112
于 2004-09-17 13:32 user profilesend a private message to usersend email to chengbdsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
要让tomcat 5.*支持EL,注意用下面的web.xml的写法:
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<jsp-config>
<jsp-property-group>
<description> Special property group for JSP Configuration JSP example. </description>
<display-name>JSPConfiguration</display-name>
<url-pattern>*.jsp</url-pattern>
<el-ignored>false</el-ignored>
<page-encoding>gb2312</page-encoding>
<scripting-invalid>false</scripting-invalid>
<include-coda></include-coda>

</jsp-property-group>
</jsp-config>
</web-app>

这个 version="2.4" 很重要的哟!

 



作者 Re:lomboz3.01不支持jstl中的el? [Re:alin_ass]
alin_ass





发贴: 183
积分: 0
于 2004-09-18 13:07 user profilesend a private message to usersend email to alin_asssearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
从lomboz不支持变成讲tomcat了Dead


叫我包子

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923