【发布时间】:2011-06-10 15:00:43
【问题描述】:
我正在尝试在 Tomcat 7.0.5 上运行简单的 Richfaces 组件。但是客户端,页面将是空白的,并且组件没有被翻译。这是代码
<!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>
我在 lib 目录中有richfaces-api-3.3.3.Final.jar 和richfaces-impl-3.3.3.Final.jar。
它在运行时询问 commons-logging-1.1.1.jar 等等。我将所有需要的 jar 文件放在 lib 目录中。
在 Tomcat 上运行它需要什么?
【问题讨论】:
-
“lib 目录”到底在哪里?
-
它在
下 -
richfaces ui 组件 jar 可能丢失