Topic: [help]lomboz 3.01 无法正确解析JSTL标记 <c:out>

  Print this page

1.[help]lomboz 3.01 无法正确解析JSTL标记 <c:out> Copy to clipboard
Posted by: potomac
Posted on: 2004-09-23 01:25

<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
<html>
<head>
<title>Count to 10 Example (using JSTL)</title>
</head>

<body>
<c:forEach var="i" begin="1" end="10" step="1">
<c:out value="${i}" /> <--lomboz 说value属性不接受表达式, But it does accept expression !!!>

<br />
</c:forEach>
</body>
</html>

请问如何解决?
Regards.

2.Re:[help]lomboz 3.01 无法正确解析JSTL标记 <c:out> [Re: potomac] Copy to clipboard
Posted by: l_walker
Posted on: 2004-09-24 14:01

我也碰到这个问题,不理它就是了,不过有点别扭:(

3.Re:[help]lomboz 3.01 无法正确解析JSTL标记 <c:out> [Re: potomac] Copy to clipboard
Posted by: steven_652
Posted on: 2004-09-25 13:25

将commons-el.jar加到你的server Classpath

4.Re:[help]lomboz 3.01 无法正确解析JSTL标记 <c:out> [Re: steven_652] Copy to clipboard
Posted by: zerol
Posted on: 2004-09-25 15:15

steven_652 wrote:
将commons-el.jar加到你的server Classpath


好像还是不行。

Work around from:
http://forge.objectweb.org/forum/forum.php?thread_id=1212&forum_id=360
when you import your taglibs, use the -rt versions and everything will be fine.

example:

use
<%@ taglib uri="WEB-INF/tld/c-rt.tld" prefix="c" %>

instead of just

<%@ taglib uri="WEB-INF/tld/c.tld" prefix="c" %>

============additional resource
Twin Libraries
The JSTL tag libraries come in two versions which differ only in the way they support the use of runtime expressions for attribute values.

In the JSTL-RT tag library, expressions are specified in the page's scripting language. This is exactly how things currently work in current tag libraries.

In the JSTL-EL tag library, expressions are specified in the JSTL expression language. An expression is a String literal in the syntax of the EL.

When using the EL tag library you cannot pass a scripting language expression for the value of an attribute. This rule makes it possible to validate the syntax of an expression at translation time.

5.Re:[help]lomboz 3.01 无法正确解析JSTL标记 <c:out> [Re: potomac] Copy to clipboard
Posted by: steven_652
Posted on: 2004-09-25 21:32

我昨天还试过可以的

具体操作可以看
http://www.javaworld.com.tw/jute/post/view?bid=10&id=60505&sty=1&tpg=1&age=0

6.Re:[help]lomboz 3.01 无法正确解析JSTL标记 <c:out> [Re: potomac] Copy to clipboard
Posted by: alin_ass
Posted on: 2004-09-26 10:01

web.xml用2.4的sheme,jstl用1.1,lomboz屁都不放


   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