myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yaron Spektor" <yaron.spek...@b6systems.com>
Subject Onload - retry
Date Thu, 11 Jan 2007 22:36:35 GMT
Hi there,

I followed your advice and tried myFaces 1.1.4. Apparently it does not
work either. These are the jars I used:

 tomahawk-1.1.5.jar

 myfaces-impl-1.1.4.jar

 myfaces-api-1.1.4.jar

 commons-beanutils-1.7.0.jar

 commons-codec-1.3.jar

 commons-collections-3.1.jar

 ccommons-el-1.0.jar

 commons-digester-1.6.jar

 commons-lang-2.1.jar

 jstl-1.1.0.jar

 commons-logging-1.0.4.jar

 jakarta-oro.jar

 commons-fileupload-1.0.jar

 commons-validator.jar

 jsfExt.0.8.1.jar

 

If this doesn't work then it's off to the usual hack with a javaBean
property or Shale PhaseListener....

Any suggestions?

 

Reminder this is the error message:

2007-01-09 10:34:39,328 [main] ERROR

org.apache.catalina.core.ContainerBase.[Cat

alina].[localhost].[/BEA2_PROJ] - Exception sending context initialized
event to listener instance of class
org.apache.myfaces.webapp.StartupServletContextLis

tener

java.lang.NoClassDefFoundError: javax/faces/event/PhaseListener

        at java.lang.ClassLoader.defineClass1(Native Method)

        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)

 

 

 

 

my faces-config is:

 

 

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer
Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">

<faces-config>

<managed-bean>

  <managed-bean-name>pc_Master</managed-bean-name>

  <managed-bean-class>pagecode.MasterBean</managed-bean-class>

  <managed-bean-scope>request</managed-bean-scope>

</managed-bean>

<managed-bean>

                        <managed-bean-name>pc_Search</managed-bean-name>

 
<managed-bean-class>pagecode.SearchBean</managed-bean-class>

                        <managed-bean-scope>session</managed-bean-scope>

            </managed-bean>

            <lifecycle>

<phase-listener>net.sf.jsfcomp.ext.onload.OnLoadPhaseListener</phase-lis
tener>

</lifecycle>

 

</faces-config>

 

the onload-config.xml is:

 

<?xml version="1.0" encoding="UTF-8"?>

 

<onload-config xmlns="urn:onload-config"

            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

            xsi:schemaLocation="urn:onload-config onload-config.xsd">

            

            <navigation-rule>

                        <view-id>/SearchScreen2.jsp</view-id>

                        <action>#{pc_Search.doBtnPrintAction}</action>

            </navigation-rule>

            <navigation-rule>

                        <view-id>/path*</view-id>

                        <action>#{pc_Search.doBtnPrintAction}</action>

            </navigation-rule>

</onload-config>

 

 

 

the web.xml is:

 

 

<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

  <context-param>

    <param-name>javax.faces.CONFIG_FILES</param-name>

    <param-value>/WEB-INF/faces-config.xml</param-value>

  </context-param>

  <listener>

 
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener<
/listener-class>

  </listener>

  <servlet>

    <servlet-name>Faces Servlet</servlet-name>

    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>

    <load-on-startup>0</load-on-startup>

  </servlet>

  <servlet-mapping>

    <servlet-name>Faces Servlet</servlet-name>

    <url-pattern>*.faces</url-pattern>

  </servlet-mapping>

  <filter>

    <filter-name>MyFacesExtensionsFilter</filter-name>

 
<filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</f
ilter-class>

    <init-param>

      <param-name>maxFileSize</param-name>

      <param-value>20m</param-value>

    </init-param>

  </filter>

  <filter-mapping>

    <filter-name>MyFacesExtensionsFilter</filter-name>

    <url-pattern>*.faces</url-pattern>

  </filter-mapping>

  <context-param>

            <param-name>onload-config</param-name>

            <param-value>/WEB-INF/onload-config.xml</param-value>

  </context-param>

</web-app>

 

 

 

i didn't change the xsd:

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 

            targetNamespace="urn:onload-config" 

            xmlns="urn:onload-config"

            elementFormDefault="qualified" version="1.0">

            

            <xs:element name="onload-config" type="Config"/>

            

            <xs:complexType name="Config">

                        <xs:annotation>

                                    <xs:documentation>

                                                Root element. Contains
the configuration for the OnLoadPhaseListener

                                    </xs:documentation>

                        </xs:annotation>            

                        <xs:sequence maxOccurs="unbounded">

                                    <xs:element name="navigation-rule"
type="Rule"/>

                        </xs:sequence>

            </xs:complexType>

            

            <xs:complexType name="Rule">

                        <xs:annotation>

                                    <xs:documentation>

                                                Defines the navigation
rule for a JSF view-id or view-id pattern

                                    </xs:documentation>

                        </xs:annotation>

                        <xs:sequence>

                                    <xs:element name="view-id"
type="ViewId"/>

                                    <xs:element name="action"
type="Action"/>

                                    <xs:element name="success-result"
type="SuccessResult" minOccurs="0"/>

                        </xs:sequence>

            </xs:complexType>

            

            <xs:simpleType name="ViewId">

                        <xs:annotation>

                                    <xs:documentation>

                                                The view ID to match.
This can be a full view-id or a path

                                                ending with an asterisk.
Examples: /myDir/myFile.xhtml, /myDir/my*, *

                                    </xs:documentation>

                        </xs:annotation>

                        <xs:restriction base="xs:string"/>

            </xs:simpleType>

            

            <xs:simpleType name="Action">

                        <xs:annotation>

                                    <xs:documentation>

                                                The EL syntax action
name to invoke. This is the same syntax as

                                                when specifying an
action in the JSF page.

                                                Example:
#{myBean.myActionMethod}

                                    </xs:documentation>

                        </xs:annotation>

                        <xs:restriction base="xs:string"/>

            </xs:simpleType>

            

            <xs:simpleType name="SuccessResult">

                        <xs:annotation>

                                    <xs:documentation>

                                                If the result of an
action is null or equal to the success result,

                                                nothing is done. If the
result is not equal to the success result

                                                the result is used to
navigate to a new view based on the 

                                                faces configuration
file.

                                    </xs:documentation>

                        </xs:annotation>

                        <xs:restriction base="xs:string"/>

            </xs:simpleType>

            

</xs:schema>

 


Mime
View raw message