What jars do you have in your WEB-INF/lib? Somewhere you still have Sun's JSF implementation (jsf-ri.jar ) in your classpath. You need to remove Sun's JSF. If you see an exception with this this element (com.sun.faces.lifecycle.RestoreViewPhase.isPostback), then you know you're still running Sun's JSF RI (com.sun.faces.**).
I hope this helps.
Adam Brod
Product Development Team
"Anthony Hong"
<[EMAIL PROTECTED]>
02/25/2006 12:32 AM
|
|
Hi Adam,
Now I follow the My faces installation guides to setup facelet, But
the problem is the same. Exception show as following:
<2006-2-25 下午01时27分40秒 CST> <Error> <HTTP> <BEA-101017> <[weblogic.servlet.
[EMAIL PROTECTED] - name: 'webapp', context-path: '/webapp']
Root cause of ServletException.
java.lang.AbstractMethodError: javax.faces.render.ResponseStateManager.isPostbac
k(Ljavax/faces/context/FacesContext;)Z
at com.sun.faces.lifecycle.RestoreViewPhase.isPostback(RestoreViewPhase.
java:200)
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.jav
a:156)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:91)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
Truncated. see log file for complete stacktrace
>
I aslo tried same on on Tomcat5.5. It shows 404 error, Page can not be found.
This is my web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<!-- Use Documents Saved as *.xhtml -->
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<!-- Special Debug Output for Development -->
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<!-- Optional JSF-RI Parameters to Help Debug -->
<context-param>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.verifyObjects</param-name>
<param-value>true</param-value>
</context-param>
<!-- Faces Servlet -->
<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>*.jsf</url-pattern>
</servlet-mapping>
</web-app>
My faces-config.xml
<?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>
<application>
<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
</application>
<managed-bean>
<managed-bean-name>NumberBean</managed-bean-name>
<managed-bean-class>facelet.tutorial.NumberBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>min</property-name>
<value>1</value>
</managed-property>
<managed-property>
<property-name>max</property-name>
<value>10</value>
</managed-property>
</managed-bean>
<!-- going from guess.xhtml to response.xhtml -->
<navigation-rule>
<from-view-id>/guess.xhtml</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/response.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<!-- going from response.xhtml to guess.xhtml -->
<navigation-rule>
<from-view-id>/response.xhtml</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/guess.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>
I follow the example in facelte site.
Any problem with my configurations?