[jboss-user] [JBoss Seam] - Project setup with Icefaces

dustismo do-not-reply at jboss.com
Fri Dec 8 18:21:11 EST 2006


I have finally gotten a test Seam app to work with mysql.  Now I would like to try Icefaces.  Problem is, I have no idea how to integrate Icefaces.  I have added all the appropriate jars, and changed the web.xml to the one from the icefaces example.  I also replaced the faces-config.xml.  Surprise, surprise this didn't work..  

Here is my web.xml

  | <?xml version="1.0" encoding="UTF-8"?>
  | 
  | 
  | 
  | <web-app version="2.5"
  | 
  |     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_2_5.xsd">
  | 
  | 
  | 
  |    <context-param>
  | 
  |       <param-name>javax.faces.CONFIG_FILES</param-name>
  | 
  |       <param-value>/WEB-INF/navigation.xml</param-value>
  | 
  |    </context-param>
  | 
  | 
  | 
  |     <!-- Seam -->
  | 
  |    
  | 
  |     <listener>
  | 
  |         <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
  | 
  |     </listener>
  | 
  | 
  | 
  |     <!-- Propagate conversations across redirects -->
  | 
  | <!--
  | 
  |     <filter>
  | 
  |         <filter-name>Seam Redirect Filter</filter-name>
  | 
  |         <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>
  | 
  |     </filter>
  | 
  |     
  | 
  |     <filter-mapping>
  | 
  |         <filter-name>Seam Redirect Filter</filter-name>
  | 
  |         <url-pattern>*.seam</url-pattern>
  | 
  |     </filter-mapping>
  | 
  | -->
  | 
  |     <filter>
  | 
  |         <filter-name>Seam Exception Filter</filter-name>
  | 
  |         <filter-class>org.jboss.seam.servlet.SeamExceptionFilter</filter-class>
  | 
  |     </filter>
  | 
  |     
  | 
  |     <filter-mapping>
  | 
  |         <filter-name>Seam Exception Filter</filter-name>
  | 
  |         <url-pattern>*.seam</url-pattern>
  | 
  |     </filter-mapping>
  | 
  | 
  | 
  |     <!-- JSF -->
  | 
  |     
  | 
  |     <context-param>
  | 
  |         <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
  | 
  |         <param-value>client</param-value>
  | 
  |     </context-param>
  | 
  | 
  | 
  |     <context-param>
  | 
  |         <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
  | 
  |         <param-value>.xhtml</param-value>
  | 
  |     </context-param>
  | 
  | 
  | 
  |     <context-param>
  | 
  |         <param-name>facelets.DEVELOPMENT</param-name>
  | 
  |         <param-value>true</param-value>
  | 
  |     </context-param>
  | 
  | 
  | 
  |     <context-param>
  | 
  |         <param-name>com.icesoft.faces.actionURLSuffix</param-name>
  | 
  |         <param-value>.seam</param-value>
  | 
  |     </context-param>
  | 
  | 
  | 
  |     <context-param>
  | 
  |         <param-name>com.icesoft.faces.synchronousUpdate</param-name>
  | 
  |         <param-value>true</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>
  | 
  | 
  | 
  |     <!-- Faces Servlet Mapping -->
  | 
  | <!--
  | 
  |     <servlet-mapping>
  | 
  |         <servlet-name>Faces Servlet</servlet-name>
  | 
  |         <url-pattern>*.seam</url-pattern>
  | 
  |     </servlet-mapping>
  | 
  | 
  | 
  | -->
  | 
  | 
  | 
  |   <servlet>
  | 
  |     <servlet-name>Blocking Servlet</servlet-name>
  | 
  |     <servlet-class>com.icesoft.faces.webapp.xmlhttp.BlockingServlet</servlet-class>
  | 
  |     <load-on-startup> 1 </load-on-startup>
  | 
  |   </servlet>
  | 
  | 
  | 
  |     <servlet>
  | 
  |         <servlet-name>Persistent Faces Servlet</servlet-name>
  | 
  |         <servlet-class>com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet</servlet-class>
  | 
  |         <load-on-startup>1</load-on-startup>
  | 
  |     </servlet>
  | 
  | 
  | 
  |   <servlet-mapping>
  | 
  |     <servlet-name>Persistent Faces Servlet</servlet-name>
  | 
  |     <url-pattern>/xmlhttp/*</url-pattern>
  | 
  |   </servlet-mapping>
  | 
  | 
  | 
  |   <servlet-mapping>
  | 
  |     <servlet-name>Persistent Faces Servlet</servlet-name>
  | 
  |     <url-pattern>/xmlhttp/*</url-pattern>
  | 
  |   </servlet-mapping>
  | 
  | 
  | 
  |   <servlet-mapping>
  | 
  |     <servlet-name>Persistent Faces Servlet</servlet-name>
  | 
  |     <url-pattern>*.iface</url-pattern>
  | 
  |   </servlet-mapping>
  | 
  | 
  | 
  |   <!-- Blocking Servlet Mapping -->
  | 
  |   <servlet-mapping>
  | 
  |     <servlet-name>Blocking Servlet</servlet-name>
  | 
  |     <url-pattern>/block/*</url-pattern>
  | 
  |   </servlet-mapping>
  | 
  | 
  | 
  |     <!-- Faces Servlet Mapping -->
  | 
  |     <servlet-mapping>
  | 
  |         <servlet-name>Persistent Faces Servlet</servlet-name>
  | 
  |         <url-pattern>*.seam</url-pattern>
  | 
  |     </servlet-mapping>
  | 
  | 
  | 
  |     <!-- MyFaces -->
  | 
  |     <listener>
  | 
  |         <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
  | 
  |     </listener>
  | 
  |  
  | 
  |     <!-- JSF RI -->
  | 
  |     <!--
  | 
  |     <listener>
  | 
  |         <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
  | 
  |     </listener> 
  | 
  |     -->
  | 
  |     
  | 
  | </web-app>
  | 


Here is my faces-config.xml

  | 
  | <?xml version='1.0' encoding='UTF-8'?>
  | 
  | <?xml version="1.0" encoding="UTF-8"?>
  | <!DOCTYPE faces-config 
  |     PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
  |     "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
  |     
  | <faces-config>
  | 
  |     <managed-bean>
  |         <managed-bean-name>highlight</managed-bean-name>
  |         <managed-bean-class>com.icesoft.faces.context.effects.Highlight</managed-bean-class>
  |         <managed-bean-scope>application</managed-bean-scope>
  |     </managed-bean>
  |     
  |     <application>
  |         <view-handler>com.icesoft.faces.facelets.D2DSeamFaceletViewHandler</view-handler>
  |     </application>
  |     
  |     <!-- Select one of the standard transaction models for the Seam application -->
  | 
  |     <lifecycle>
  |         <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
  |     </lifecycle>
  | 
  | </faces-config>
  | 
  | 

I am using jboss 4.0.5GA and seam 1.1.0.CR2
The project was generated using seam-gen (ideally I think the project setup should ask whether you want to use Icefaces and configure it accordingly).

Here is the error message I get

  | StandardWrapper.Throwable
  | java.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions!
  | If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml.
  | A typical config looks like this;
  | <listener>
  |   <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
  | </listener>
  | 
  | 	at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90)
  | 	at javax.faces.webapp.FacesServlet.init(FacesServlet.java:88)
  | ....
  | ....
  | 

Any help?

Thanks much,
Dustin

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992374#3992374

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992374



More information about the jboss-user mailing list