Mike Kienenberger wrote:
On 4/11/06, Murray Brandon <[EMAIL PROTECTED]> wrote:
I added an <h:messages/> tag and there are none - I haven't plugged in
any validation yet anyway.
I redid a clean example (ie. vanilla myfaces/tomahawk) to be sure I
wasn't wasting your time. ;-)

Murray,
I know this has been mentioned to you in another couple of threads as
well, but please check and make sure you've got the extensions filter
installed correctly.

I did double check - is there a way to list the extension filters installed at runtime? Perhaps there's some issue with jar versions. (I've noticed that if the extension filters don't load, Tomcat doesn't start the webapp anyway, and mine starts ok)

I've attached my web.xml and faces.config.xml which I think are right. Would be nice to get a second opinion tho.

Regards, Murray
<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE web-app PUBLIC
  "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
  "http://java.sun.com/dtd/web-app_2_3.dtd";>


<web-app>

    <display-name>Adaptive UI</display-name>
    <description>
        Data-driven UI.
    </description>

    <context-param>
        <param-name>facelets.LIBRARIES</param-name>
        <param-value>/WEB-INF/facelet/aui.taglib.xml;/WEB-INF/facelet/tomahawk.taglib.xml</param-value>
    </context-param>
    
    <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>client</param-value>
    </context-param>

    <context-param>
        <param-name>facelets.DEVELOPMENT</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.VIEW_MAPPINGS</param-name>
        <param-value>*.xhtml</param-value>
    </context-param>

    <context-param>
        <param-name>com.sun.faces.validateXml</param-name>
        <param-value>false</param-value>
        <description>
            Set this flag to true if you want the JavaServer Faces
            Reference Implementation to validate the XML in your
            faces-config.xml resources against the DTD.  Default
            value is false.
        </description>
    </context-param>

    <context-param>
        <param-name>com.sun.faces.verifyObjects</param-name>
        <param-value>true</param-value>
        <description>
            Set this flag to true if you want the JavaServer Faces
            Reference Implementation to verify that all of the application
            objects you have configured (components, converters,
            renderers, and validators) can be successfully created.
            Default value is false.
        </description>
    </context-param>

    <context-param>
        <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
        <param-value>true</param-value>
    </context-param>


    <!-- Before you can run any JSF application on the J2EE application server, you must configure 
         the web.xml application descriptor to include the MyFaces API FacesServlet -->
    <servlet>
        <servlet-name>FacesServlet</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>FacesServlet</servlet-name>
        <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    
    <servlet-mapping>
        <servlet-name>FacesServlet</servlet-name>
        <url-pattern>*.faces</url-pattern>
    </servlet-mapping>

    <security-constraint>
	 <!-- This security constraint illustrates how JSP pages 
             with JavaServer Faces components can be protected from
             being accessed without going through the Faces Servlet.
             The security constraint ensures that the Faces Servlet will
             be used or the pages will not be processed. -->
	<display-name>Restrict access to JSP pages</display-name>
	<web-resource-collection>
            <web-resource-name>
		Restrict access to JSP pages
            </web-resource-name>
	    <url-pattern>/greeting.xhtml</url-pattern>
	    <url-pattern>/response.xhtml</url-pattern>
	</web-resource-collection>
	<auth-constraint>
	    <description>
		With no roles defined, no access granted
	    </description>
	</auth-constraint>
    </security-constraint>



    <!-- XXXXXXXXXXXXXXXXXXXXXX custom XXXXXXXXXXXXXXXXXXXXXXXX -->
    <servlet>
        <servlet-name>Initial</servlet-name>
        <description>Initializer servlet</description>
        <servlet-class>com.playpen.ncs.aui.servlet.InitialServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>



    <!-- XXXXXXXXXXXXXXXXXXXXXX Apache MyFaces XXXXXXXXXXXXXXXXXXXXXXXX -->
    <filter>
    	<filter-name>MyFacesExtensionsFilter</filter-name>
    	<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
        <init-param>
            <param-name>maxFileSize</param-name>
            <param-value>20m</param-value>
            <description>Set the size limit for uploaded files.
                Format: 10 - 10 bytes
                        10k - 10 KB
                        10m - 10 MB
                        1g - 1 GB
            </description>
        </init-param>
    </filter>
    
    <!-- extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages  -->
    <filter-mapping>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <servlet-name>FacesServlet</servlet-name>
    </filter-mapping>
    
    <!-- extension mapping for serving page-independent resources (javascript, stylesheets, images, etc.)  -->
    <filter-mapping>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
    </filter-mapping>

    <filter-mapping>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
     

    <!-- XXXXXXXXXXXXXXXXXXXXXX Oracle ADF faces XXXXXXXXXXXXXXXXXXXXXX -->
    
    <context-param>  
        <param-name>oracle.adf.view.faces.ALTERNATE_VIEW_HANDLER</param-name>
        <param-value>com.sun.facelets.FaceletViewHandler</param-value>
    </context-param>

    <!-- In addition, to use ADF Faces on top of the JSF Servlet, you must configure a filter that is mapped to the FacesServlet (also in the web.xml file) -->
    <filter>
        <filter-name>AdfFacesFilter</filter-name>
        <filter-class>oracle.adf.view.faces.webapp.AdfFacesFilter</filter-class>
    </filter>
    
    <filter-mapping>
        <filter-name>AdfFacesFilter</filter-name>
        <servlet-name>FacesServlet</servlet-name>
    </filter-mapping>


      <!-- resource loader servlet -->
      <servlet>
        <servlet-name>resources</servlet-name>
        <servlet-class>oracle.adf.view.faces.webapp.ResourceServlet</servlet-class>
      </servlet>

      <servlet-mapping>
        <servlet-name>resources</servlet-name>
        <url-pattern>/adf/*</url-pattern>
      </servlet-mapping>

    
</web-app>
<?xml version="1.0"?>


<!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>

    <!-- This class knows how to resolve #{mob.classname.property} EL references -->
    <application>
        <property-resolver>com.playpen.ncs.aui.jsf.el.AuiPropertyResolver</property-resolver>
    </application>
    <application>
        <variable-resolver>com.playpen.ncs.aui.jsf.el.AuiVariableResolver</variable-resolver>
    </application>
   
    <!-- This class listens to ALL the 6 phases in the facelet lifecycle and gets run once each phase -->
    <lifecycle>
        <phase-listener>com.playpen.ncs.aui.jsf.AuiPhaseListener</phase-listener>
    </lifecycle>


    <managed-bean>
        <managed-bean-name>editor</managed-bean-name>
        <managed-bean-class>com.playpen.ncs.aui.jsf.ComponentEditorHandler</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>

    <managed-bean>
        <managed-bean-name>myModel</managed-bean-name>
        <managed-bean-class>com.playpen.ncs.aui.model.MyModel</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>

    <application>
        <default-render-kit-id>
            oracle.adf.core
        </default-render-kit-id>
    </application>

</faces-config>

Reply via email to