Thanks Mike,

Great advice! - I reordered my web.xml and now the ADF file upload and the multi-part mime encoded form works fine.
For those interested, I've attached the new web.xml

I'm still having issues with the missing myfaces clear_formname( ) javascript and the <af:table not rendering content, but I'll try and isolate the latter into a cleaner example. Having uploaded a file, can I then serve that up as an image in the app or does <af:objectImage only serve up images from inside the war file system?

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";>

<!-- Note! Order of the sections are important, 
     ie. context-params must come before filters -->
<web-app>

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

    <!-- ============================ -->
    <!-- == SECTION: CONTEXT-PARAM == -->
    <!-- ============================ -->
    <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>

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


    <!-- ===================== -->
    <!-- == SECTION: FILTER == -->
    <!-- ===================== -->
    <!-- ADF: to use ADF Faces on top of the JSF Servlet, you must configure a 
         filter that is mapped to the FacesServlet -->
    <filter>
        <filter-name>AdfFacesFilter</filter-name>
        <filter-class>oracle.adf.view.faces.webapp.AdfFacesFilter</filter-class>
    </filter>
    
    <!-- MyFaces: -->
    <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>

    
    <!-- ============================= -->
    <!-- == SECTION: FILTER-MAPPING == -->
    <!-- ============================= -->
     
    <filter-mapping>
        <filter-name>AdfFacesFilter</filter-name>
        <servlet-name>FacesServlet</servlet-name>
    </filter-mapping>

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


    <!-- ====================== -->
    <!-- == SECTION: SERVLET == -->
    <!-- ====================== -->

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

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

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


    <!-- ============================== -->
    <!-- == SECTION: SERVLET-MAPPING == -->
    <!-- ============================== -->
    
    <servlet-mapping>
        <servlet-name>resources</servlet-name>
        <url-pattern>/adf/*</url-pattern>
    </servlet-mapping>

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

</web-app>

Reply via email to