JSF RichFaces componenents on Tomcat
I am trying to run simple Richfaces component on Tomcat 7.0.5. But client side, page will be blank and the components are not getting translated. Here is the code
<!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:outputTex开发者_Go百科t 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>
This translates to blank page and the html source code is:
<!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>
I have richfaces-api-3.3.3.Final.jar and richfaces-impl-3.3.3.Final.jar in lib directory.
It asked commons-logging-1.1.1.jar and so on while running. I placed all required jar file in lib directory.
What do I need to run this on Tomcat?
How do you call the page? Make sure it's http://host/app/page.jsf (not .xhtml)
精彩评论