Newbie Richfaces setup problems Netbeans 6.8
salman4u Mar 2, 2010 9:08 AMHello,
I am trying to make my first web application in Richfaces but things are not working. I am really tired now. I don't know what's happening. I did exactly what i found in Richfaces documentation PDF. But it's not working. Here are the details :-
This is my simple web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>blueSky</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.CONTROL_SKINNING</param-name>
<param-value>enable</param-value>
</context-param>
<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>richfaces</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>faces/index.xhtml</welcome-file>
</welcome-file-list>
</web-app>
This is my super simple index.xhtml :-
<?xml version='1.0' encoding='UTF-8' ?>
<!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:h="http://java.sun.com/jsf/html"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<h:head>
<title>Facelet Title</title>
</h:head>
<h:body>
Laala
<a4j:form>
<rich:panel header="Richfaces Panel" style="width:315px;">
<h:outputText value ="Your name :"/>
</rich:panel>
</a4j:form>
</h:body>
</html>
It doesn't work . I just get Laala written in browser, when i inspect the view source from mozilla, this is what i get :-
<?xml version='1.0' encoding='UTF-8' ?>
<!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:h="http://java.sun.com/jsf/html"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<h:head>
<title>Facelet Title</title>
</h:head>
<h:body>
Bapa
<link class="component" href="/RichFacesWorkingDemo/faces/a4j/s/3_3_2.SR1org/richfaces/renderkit/html/css/basic_both.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__" rel="stylesheet" type="text/css" /><link class="component" href="/RichFacesWorkingDemo/faces/a4j/s/3_3_2.SR1org/richfaces/renderkit/html/css/extended_both.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__" media="rich-extended-skinning" rel="stylesheet" type="text/css" /><script type="text/javascript">window.RICH_FACES_EXTENDED_SKINNING_ON=true;</script><script src="/RichFacesWorkingDemo/faces/a4j/g/3_3_2.SR1org/richfaces/renderkit/html/scripts/skinning.js" type="text/javascript"></script><rich:editor id="edt"/>
<a4j:form>
<rich:panel header="Richfaces Panel" style="width:315px;">
<h:outputText value ="Your name :"/>
</rich:panel>
</a4j:form>
</h:body>
</html>
I don't know why does it not render anything and simply outputs h:body rich:panel etc . This are the files present in my lib folder :-
commons-collections-3.2.1.jar
commons-beanutils-1.8.2.jar
commons-digester-2.0.jar
commons-logging-1.1.1.jar
jhighlight-1.0.jar
richfaces-api-3.3.2.SR1.jar
richfaces-impl-3.3.2.SR1.jar
richfaces-ui-3.3.2.SR1.jar
Please help me folks! it's almost been 4 hours now just making this equivalent hello world type of application.