【问题标题】:Eclipse + JSF + Spring Form = CANNOT_FIND_FACELET_TAGLIBEclipse + JSF + Spring Form = CANNOT_FIND_FACELET_TAGLIB
【发布时间】:2012-04-19 03:26:25
【问题描述】:
<html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html" 
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:form="http://www.springframework.org/tags/form" <-- CANNOT_FIND_FACELET_TAGLIB
        xmlns:s="http://www.springframework.org/tags"> <--  CANNOT_FIND_FACELET_TAGLIB
<ui:composition template="../../templates/master-page.xhtml">
    <ui:define name="title">Home</ui:define>
    <ui:define name="parentSelected">Restaurante</ui:define>
    <ui:define name="childSelected">Adicionar</ui:define>
    <ui:define name="content">
        bla
        ${teste}
        ${teste2}
        <h:button value="BLA" />
    </ui:define>
</ui:composition>
</html>

晚安,我在使用 Spring Form taglib 在页面上创建带有 spring 的表单时遇到了问题。使用jsf的xhtml,使spring form taglib不被识别。

【问题讨论】:

  • 您显然在使用 Eclipse。这个以纯文本显示而不是本地化的错误消息键被称为 Eclipse 本地化错误之一。至于具体的问题,忽略报错,部署运行项目是否有效?

标签: spring jsf spring-mvc


【解决方案1】:

你的类路径中应该有 spring-servlet.jar,表单 taglib 存在于这个 jar 中的 META-INF 中。

【讨论】:

  • 是的...在我看来是将spring-servlet.jar放入WebContent\WEB-INF\lib文件夹的最简单方法
  • 我的应用程序中包含 spring-servlet.jar 类pth,它甚至无法识别。
猜你喜欢
  • 1970-01-01
  • 2014-05-16
  • 2011-11-24
  • 2012-06-28
  • 1970-01-01
  • 1970-01-01
  • 2014-06-21
  • 1970-01-01
  • 2012-02-22
相关资源
最近更新 更多