myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neuman, Ben J., A&M IRM" <bjneu...@hq.afis.osd.mil>
Subject RE: RequestParamServltFilter Bug
Date Fri, 01 Sep 2006 17:43:05 GMT
Hey Mario!

Below is my web.xml (parts of interest). Note that I only need to comment
out the ADD_RESOURCE_CLASS Context Parameter and remove the use of
<t:document*> tags to break the app (as described below). You will also
notice that I am using Facelets -- perhaps the true culprit of the problem?

Later!
Ben

<?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">
    
    <context-param>
        <description>Spring Framework configuration file</description>
        <param-name>contextConfigLocation</param-name>
        <param-value>
            /WEB-INF/spring-jpa-context.xml                    
        </param-value>
    </context-param>
    
    <context-param>
        <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
        <param-value>.xhtml</param-value>
    </context-param>
    
    <!-- Use this or facelets will evaluate comments -->
    <context-param>
        <param-name>facelets.SKIP_COMMENTS</param-name>
        <param-value>true</param-value>
    </context-param>
    
    <!-- Special Debug Output for Development -->
    <context-param>
        <param-name>facelets.DEVELOPMENT</param-name>
        <param-value>true</param-value>
    </context-param>
    
    <!-- Refresh time for page modification recognizance (-1 for never) -->
    <context-param>
        <param-name>facelets.REFRESH_PERIOD</param-name>
        <param-value>2</param-value>
    </context-param>
    
    <!-- Facelets needs to be told about third party taglibs -->
    <context-param>
        <param-name>facelets.LIBRARIES</param-name>
        <param-value>
            /WEB-INF/tomahawk.taglib.xml;
            /WEB-INF/sandbox.taglib.xml;
            /WEB-INF/afis.taglib.xml
        </param-value>
    </context-param>
    
    <context-param>
        <!-- Improve performance. Requires the use of <t:documentHead/> tag
in place of <HEAD> -->    
        <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
 
<param-value>org.apache.myfaces.component.html.util.StreamingAddResource</pa
ram-value>
    </context-param>
    
    <!-- MyFaces context parameters -->
    <context-param>
        <description>
            This parameter tells MyFaces if javascript code should be
allowed in the
            rendered HTML output.
            If javascript is allowed, command_link anchors will have
javascript code
            that submits the corresponding form.
            If javascript is not allowed, the state saving info and nested
parameters
            will be added as url parameters.
            Default: "true"
        </description>
        <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
        <param-value>true</param-value>        
    </context-param>
    <context-param>
        <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
        <param-value>false</param-value>
    </context-param>
    
    <context-param>
        <description>Save state in client or server.</description>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>server</param-value>
    </context-param>    
    
    <filter>
        <filter-name>extensionsFilter</filter-name>
 
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-clas
s>
        <init-param>
            <description>Set the size limit for uploaded files.
                Format: 10 - 10 bytes
                10k - 10 KB
                10m - 10 MB
                1g - 1 GB
            </description>
            <param-name>uploadMaxFileSize</param-name>
            <param-value>100m</param-value>            
        </init-param>
        <init-param>
            <description>Set the threshold size - files
                below this limit are stored in memory, files above
                this limit are stored on disk.
                
                Format: 10 - 10 bytes
                10k - 10 KB
                10m - 10 MB
                1g - 1 GB
            </description>
            <param-name>uploadThresholdSize</param-name>
            <param-value>100k</param-value>            
        </init-param>
        <!--        <init-param>
        <param-name>uploadRepositoryPath</param-name>
        <param-value>/temp</param-value>
        <description>Set the path where the intermediary files will be
stored.
        </description>
        </init-param>-->
    </filter>
    <filter>
        <filter-name>conversationFilter</filter-name>
 
<filter-class>org.apache.myfaces.custom.conversation.ConversationServletFilt
er</filter-class>
    </filter>
    <filter>
        <filter-name>requestParameterProvider</filter-name>
 
<filter-class>org.apache.myfaces.custom.requestParameterProvider.RequestPara
meterServletFilter</filter-class>
    </filter>
    
    <filter-mapping>
        <filter-name>requestParameterProvider</filter-name>
        <url-pattern>*.xhtml</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>conversationFilter</filter-name>
        <url-pattern>*.xhtml</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>extensionsFilter</filter-name>
        <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>extensionsFilter</filter-name>
        <url-pattern>*.xhtml</url-pattern>
    </filter-mapping>
    <listener>
        <description>Needed to load the Spring Application
Context</description>
 
<listener-class>org.springframework.web.context.ContextLoaderListener</liste
ner-class>
    </listener>
    
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.xhtml</url-pattern>
    </servlet-mapping>
        
</web-app>

-----Original Message-----
From: Mario Ivankovits [mailto:mario@ops.co.at]
Sent: Friday, September 01, 2006 11:11 AM
To: MyFaces Development
Subject: Re: RequestParamServltFilter Bug


Hi Ben!
> First, my apologies for the premature WIKI entry concerning the
Conversation
> Tag. I'll be more discerning about my entries in the future.
>   
Oh - that was no problem. I just didnt know how to reach you so I
thought I try through the wiki page itself.
:-)

I use the conversationTag with the "old" DefaultAddResource and didnt
have your problem - and I use the inputCalendar, etc stuff.
Could you please post (or send me) your web.xml.
It must have something to do with the filter mapping.

As a hint - In our application we have a mapping like (in this order):
FacesExtensions, RequestParameterFilter, ConversationFilter - all mapped
to "/path/*"
Our Faces Servlet is mapped to "*.faces"
So a typical url looks like /path/MyFacesPage.faces

Thanks!
Ciao,
Mario

Mime
View raw message