Компоненты JSF RichFaces на Tomcat

Я пытаюсь запустить простой компонент Richfaces на Tomcat 7.0.5. Но на стороне клиента страница будет пустой, а компоненты не будут переведены. Вот код

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich">
    <rich:panel style="width:220px;">
        <f:facet name="header">
            <h:outputText value="Form built with inplaces"></h:outputText>
        </f:facet>
        <h:panelGrid columns="1">
            <rich:inplaceInput defaultLabel="click to enter your name" />
            <rich:inplaceSelect defaultLabel="click to choose your country" showControls="true">
                <f:selectItem itemLabel="USA" itemValue="0"/>
                <f:selectItem itemLabel="Canada" itemValue="0"/>
                <f:selectItem itemLabel="UK" itemValue="0"/>
            </rich:inplaceSelect>
        </h:panelGrid>
    </rich:panel>
</html>

Это переводится на пустую страницу, а исходный код html:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich">
    <rich:panel style="width:220px;">
        <table>
            <tbody>
                <tr>
                    <td>
                        <rich:inplaceInput defaultLabel="click to enter your name"></rich:inplaceInput>
                        <rich:inplaceSelect defaultLabel="click to choose your country" showControls="true">
                    </td>
                </tr>
                <tr>
                    <td></td>
                </tr>
                <tr>
                    <td></td>
                </tr>
                <tr>
                    <td></td>
                </tr>
                <tr>
                    <td></rich:inplaceSelect></td>
                </tr>
            </tbody>
        </table>
    </rich:panel>
</html>

У меня есть richfaces-api-3.3.3.Final.jar и richfaces-impl-3.3.3.Final.jar в каталоге lib.

Он спрашивал commons-logging-1.1.1.jar и т. д. во время работы. Я поместил весь необходимый файл jar в каталог lib.

Что мне нужно, чтобы запустить это на Tomcat?


person GDK    schedule 17.01.2011    source источник
comment
Где именно находится каталог lib?   -  person BalusC    schedule 17.01.2011
comment
Он находится в папке ‹tomCat/webapps/(projectName)/WEB-INF/lib.   -  person GDK    schedule 18.01.2011
comment
jar компонентов пользовательского интерфейса richfaces может отсутствовать   -  person    schedule 06.02.2013


Ответы (1)


Как назвать страницу? Убедитесь, что это http://host/app/page.jsf (не .xhtml)

person Max Katz    schedule 19.01.2011
comment
Вывод HTML показывает, что стандартные теги JSF были обработаны, поэтому URL-адрес определенно в порядке. - person BalusC; 19.01.2011