2012-04-19 55 views
1
<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在頁面上用彈簧創建表單的問題。 xhtml使用jsf,這樣spring tag tag就不會被識別。Eclipse + JSF + Spring Form = CANNOT_FIND_FACELET_TAGLIB

+0

你明明在使用Eclipse。此錯誤消息鍵被顯示爲純文本而不是本地化,被稱爲Eclipse本地化錯誤之一。至於具體問題,如果您忽略錯誤並部署和運行項目,它是否工作? – BalusC 2012-04-19 11:27:49

回答

0

你應該在你的類路徑中使用spring-servlet.jar,taglib存在於這個jar文件的META-INF中。

+0

是的......在我看來,將spring-servlet.jar放到WebContent \ WEB-INF \ lib文件夾中最簡單的方法 – Tobi 2012-04-19 05:15:55

+0

我的應用程序中包含spring-servlet.jar classpth,它不是更多甚至認可。 – 2012-04-19 13:05:33