Eclipse 中的自定义 tld 函数验证
我正在 eclipse (Ganymede 3.4.1) 中工作,并创建了一个 ctl TLD :
<?xml version="1.0" encoding="UTF-8"?>
<taglib version="2.0" 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-jsptaglibrary_2_0.xsd">
<tlib-version>2.0</tlib-version>
<short-name>Name</short-name>
<function>
<name>readExtendedField</name>
<function-class>uk.newsint.advertising.wsconnection.ConnectionManager</function-class>
<function-signature>
java.lang.String readExtendedField( uk.newsint.advertising.aws.ExtendedFields , java.lang.String )
</function-signature>
</function>
</taglib>
并在我的 jsp 中引用了它(摘录):
<%@ taglib uri="/WEB-INF/appUtils.tld" prefix="au"%>
<c:forEach items="${myAdsForm.result.resultList}" var="lin">
<tr>
<td>${au:readExtendedField(lin,"EXTRDATE")}</td>
</tr>
</c:forEach>
Eclipse 在本节上给了我一个 EL 语法错误${au:readExtendedField(lin,"EXTRDATE ")} 并将其分配给第一个引号和结束括号 {" 和 )}。
该表达式在 tomcat 下工作正常,但当我尝试提交到存储库时,Eclipse 会警告我,当然,在问题选项卡中显示错误
。其他人也遇到过这个问题,有人有解决办法吗?
I am working in eclipse (Ganymede 3.4.1) and have created a ctl TLD :
<?xml version="1.0" encoding="UTF-8"?>
<taglib version="2.0" 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-jsptaglibrary_2_0.xsd">
<tlib-version>2.0</tlib-version>
<short-name>Name</short-name>
<function>
<name>readExtendedField</name>
<function-class>uk.newsint.advertising.wsconnection.ConnectionManager</function-class>
<function-signature>
java.lang.String readExtendedField( uk.newsint.advertising.aws.ExtendedFields , java.lang.String )
</function-signature>
</function>
</taglib>
and referenced it in my jsp (excerpts):
<%@ taglib uri="/WEB-INF/appUtils.tld" prefix="au"%>
<c:forEach items="${myAdsForm.result.resultList}" var="lin">
<tr>
<td>${au:readExtendedField(lin,"EXTRDATE")}</td>
</tr>
</c:forEach>
Eclipse is giving me an EL Sytax error on the this section${au:readExtendedField(lin,"EXTRDATE")} and assigning it to the first quote and the closing bracket {" and )}.
The expression works fine under tomcat but eclipse warns me when I try to commit to the repository and of course shows errors in the problems tab.
Has anyone else suffered this and does anyone have a fix?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您现在可能已经找到了答案,但万一您还没有找到答案(并启发其他浏览此页面的人,但您的自定义标签应被视为标签,而不仅仅是另一个标签体内的元素。它应该是
You've probably already found your answer by now, but in case you haven't (and to enlighten anybody else that comes across this page, but your custom tags should be treated as tags, not merely elements inside another tag body. It should be
<au:.../>