【问题标题】:JSPX tags doesn't work with Wildfly CR1JSPX 标签不适用于 Wildfly CR1
【发布时间】:2013-12-26 05:57:00
【问题描述】:

我已经在 jboss 论坛上发布了这个问题,但我没有得到任何答案。

我认为我错过了什么,但我不知道我错过了什么。

当我将现有应用程序从 JBoss AS 7.1 迁移到 Wildfly 8CR1 时,出现以下错误。

当应用程序启动时,我访问的第一页显示正常。但是我访问的第二页发生了错误。我认为 Wildfly 编译了我的 default.tagx 并且包含该标签的第一页工作正常。但是任何其他页面都无法获取编译后的tagx。

我的代码是这样的:

default.tagx

<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" 
xmlns:html="http://www.w3.org/1999/xhtml" version="2.2">

    <jsp:output doctype-root-element="HTML" 
doctype-system="about:legacy-compat" omit-xml-declaration="yes" />

    some code
    <jsp:doBody />
    more code
</jsp:root>

所有页面都使用:

<tags:default xmlns:tags="urn:jsptagdir:/WEB-INF/tags" 
xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:html="http://www.w3.org/1999/xhtml">

    <jsp:output omit-xml-declaration="yes" />
    my code here
</tags:default>

错误是:

org.apache.jasper.JasperException: java.lang.ClassCastException: org.apache.jsp.tag.web.default_tagx cannot be cast to org.apache.jsp.tag.web.default_tagx

【问题讨论】:

  • 你的 web.xml 长什么样,你的 WEB-INF/lib 的内容是什么

标签: jboss jspx wildfly


【解决方案1】:

我认为这是 Wildfly 8.0.0-CR1 的问题,因为更新到 8.1-Final,一切正常。所以如果有人遇到这个问题,更新会解决的。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-07-15
    • 2014-08-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多