[jboss-user] [JBoss Seam] - Jboss Seam+Facelet!
vprasanx
do-not-reply at jboss.com
Thu Aug 9 10:00:20 EDT 2007
Hi,
I'm creating a reference application for a project with Jboss Seam. I'm using Seam2.0 beta & Glassfish server 9.1. I'm using Netbeans IDE5.5.1.
I'd created a sample application with Jboss Seam, JSF & EJB3.0 & it works fine. But I need to render Facelet & Ajax4Jsf support to my application. I searched for support documents, but nothing worked. When I add facelet & Seam, I always get,
WebModule[/SVPSeam-war]PWC1275: Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
java.lang.NullPointerException
at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:100)............
error.
Kindly provide me exact procedure for creating Jboss Seam Application with Facelet.
My faces-config.xml looks like this,
<?xml version='1.0' encoding='UTF-8'?>
<!-- =========== FULL CONFIGURATION FILE ================================== -->
<faces-config version="1.2"
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-facesconfig_1_2.xsd">
<phase-listener>
org.jboss.seam.jsf.SeamPhaseListener
</phase-listener>
<view-handler>
com.sun.facelets.FaceletViewHandler
</view-handler>
<!-- seam on JSF 1.2 -->
<!--
<el-resolver>
org.jboss.seam.jsf.SeamELResolver
</el-resolver>
-->
</faces-config>
& my web.xml is like this,
<?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">
<listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
<context-param>
<param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
<param-value>com.sun.facelets.FaceletViewHandler</param-value>
</context-param>
<context-param>
<param-name>org.ajax4jsf.SKIN</param-name>
<param-value>blueSky</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.verifyObjects</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>true</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>false</param-value>
</context-param>
<context-param>
<param-name>facelets.SKIP_COMMENTS</param-name>
<param-value>true</param-value>
</context-param>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>
index.jsp
</welcome-file>
</welcome-file-list>
<context-param>
<param-name>org.jboss.seam.core.init.jndiPattern</param-name>
<param-value>java:comp/env/SVPSeam/#{ejbName}/local</param-value>
</context-param>
<ejb-local-ref>
<ejb-ref-name>SVPSeam/SVPHelloBean/local</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
com.java.SVPHelloLocal
<ejb-link>SVPHelloBean</ejb-link>
</ejb-local-ref>
<!--<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>-->
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</web-app>
Thanks,
Venkates
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4072523#4072523
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4072523
More information about the jboss-user
mailing list