You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Dan Zehme (JIRA)" <my...@incubator.apache.org> on 2005/07/21 16:03:20 UTC

[jira] Created: (MYFACES-347) ExtensionFilter called multiple times under Weblogic

ExtensionFilter called multiple times under Weblogic
----------------------------------------------------

         Key: MYFACES-347
         URL: http://issues.apache.org/jira/browse/MYFACES-347
     Project: MyFaces
        Type: Bug
    Versions: 1.0.9 beta    
 Environment: Windows 2000 Server, Weblogic 8.1 SP2
    Reporter: Dan Zehme


Because of a lack of clarity in some version of the serlvet specification, Weblogic, unlike Tomcat and JBoss, invoke the servlet filters not only on the initial request but on forwards and includes through the RequestDispatcher.  This behavior causes the ExtensionFilter to be called multiple times for a single request causing multiple insertions of the header information or unnecessary errors indicating that no head or body was found.

The solution to this problem is to set a request attribute indicating that the filter has been run and just calling chain.doFilter() when that request attribute is set.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (MYFACES-347) ExtensionFilter called multiple times under Weblogic

Posted by "Martin Marinschek (JIRA)" <my...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-347?page=all ]
     
Martin Marinschek resolved MYFACES-347:
---------------------------------------

    Fix Version: Nightly Build
     Resolution: Fixed

> ExtensionFilter called multiple times under Weblogic
> ----------------------------------------------------
>
>          Key: MYFACES-347
>          URL: http://issues.apache.org/jira/browse/MYFACES-347
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Versions: 1.0.9 beta
>  Environment: Windows 2000 Server, Weblogic 8.1 SP2
>     Reporter: Dan Zehme
>     Assignee: Martin Marinschek
>      Fix For: Nightly Build

>
> Because of a lack of clarity in some version of the serlvet specification, Weblogic, unlike Tomcat and JBoss, invoke the servlet filters not only on the initial request but on forwards and includes through the RequestDispatcher.  This behavior causes the ExtensionFilter to be called multiple times for a single request causing multiple insertions of the header information or unnecessary errors indicating that no head or body was found.
> The solution to this problem is to set a request attribute indicating that the filter has been run and just calling chain.doFilter() when that request attribute is set.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (MYFACES-347) ExtensionFilter called multiple times under Weblogic

Posted by "sean schofield (JIRA)" <my...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-347?page=all ]
     
sean schofield closed MYFACES-347:
----------------------------------


> ExtensionFilter called multiple times under Weblogic
> ----------------------------------------------------
>
>          Key: MYFACES-347
>          URL: http://issues.apache.org/jira/browse/MYFACES-347
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Versions: 1.0.9 beta
>  Environment: Windows 2000 Server, Weblogic 8.1 SP2
>     Reporter: Dan Zehme
>     Assignee: Martin Marinschek
>      Fix For: Nightly Build

>
> Because of a lack of clarity in some version of the serlvet specification, Weblogic, unlike Tomcat and JBoss, invoke the servlet filters not only on the initial request but on forwards and includes through the RequestDispatcher.  This behavior causes the ExtensionFilter to be called multiple times for a single request causing multiple insertions of the header information or unnecessary errors indicating that no head or body was found.
> The solution to this problem is to set a request attribute indicating that the filter has been run and just calling chain.doFilter() when that request attribute is set.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-347) ExtensionFilter called multiple times under Weblogic

Posted by "Martin Marinschek (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-347?page=comments#action_12319358 ] 

Martin Marinschek commented on MYFACES-347:
-------------------------------------------

I have checked in a fix for this - hope this fits. Particularly, I am calling chain.doFilter even if the filter has been called before, if I don't do that, the response would stop dead. All I do is I get rid of all special handling by the extension filter.

Try it out, I will close the bug if this works.

regards,

Martin

P.S.:

corresponding source section:

        if(request.getAttribute(DOFILTER_CALLED)!=null)
        {   
            chain.doFilter(request, response);
            return;
        }
        
        request.setAttribute(DOFILTER_CALLED,"true");

> ExtensionFilter called multiple times under Weblogic
> ----------------------------------------------------
>
>          Key: MYFACES-347
>          URL: http://issues.apache.org/jira/browse/MYFACES-347
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Versions: 1.0.9 beta
>  Environment: Windows 2000 Server, Weblogic 8.1 SP2
>     Reporter: Dan Zehme
>     Assignee: Martin Marinschek
>      Fix For: Nightly Build

>
> Because of a lack of clarity in some version of the serlvet specification, Weblogic, unlike Tomcat and JBoss, invoke the servlet filters not only on the initial request but on forwards and includes through the RequestDispatcher.  This behavior causes the ExtensionFilter to be called multiple times for a single request causing multiple insertions of the header information or unnecessary errors indicating that no head or body was found.
> The solution to this problem is to set a request attribute indicating that the filter has been run and just calling chain.doFilter() when that request attribute is set.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (MYFACES-347) ExtensionFilter called multiple times under Weblogic

Posted by "Bruno Aranda (JIRA)" <my...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-347?page=all ]

Bruno Aranda updated MYFACES-347:
---------------------------------

    Component: Tomahawk

> ExtensionFilter called multiple times under Weblogic
> ----------------------------------------------------
>
>          Key: MYFACES-347
>          URL: http://issues.apache.org/jira/browse/MYFACES-347
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Versions: 1.0.9 beta
>  Environment: Windows 2000 Server, Weblogic 8.1 SP2
>     Reporter: Dan Zehme

>
> Because of a lack of clarity in some version of the serlvet specification, Weblogic, unlike Tomcat and JBoss, invoke the servlet filters not only on the initial request but on forwards and includes through the RequestDispatcher.  This behavior causes the ExtensionFilter to be called multiple times for a single request causing multiple insertions of the header information or unnecessary errors indicating that no head or body was found.
> The solution to this problem is to set a request attribute indicating that the filter has been run and just calling chain.doFilter() when that request attribute is set.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira