You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Roman Hrivik <hr...@isdd.sk> on 2003/11/27 11:41:17 UTC

cocoon with servlet Filter - running twice

Hi

I put simple test filter before cocoon servlet.

But I have a problem with it, because my Filter runs twice.
I run Cocoon on oracle OC4J.
There is just simple System.out.print in my filter just count the runs

	int runs=0;
	public void doFilter(
		ServletRequest request,
		ServletResponse response,
		FilterChain chain)
		throws IOException, ServletException {

        System.out.println("========= TestFilter " + ++runs + "
=========");
        chain.doFilter(request, response);

	}


When I tested filter on other servlets than cocoon everything was OK.
But when I mapped my filter to Cocoon servlet my filter runs twice.

Can anybody help ?

Thks.

Roman








---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: cocoon with servlet Filter - running twice

Posted by Roman Hrivik <hr...@isdd.sk>.
:-))
yes you was right, sorry for this stupid taks :-)
I was tired yesterday.
It was happenning when I tested my app - refreshing page in mozilla
I miss that there was also request to CSS style :-), sorry.

Roman




-----Původní zpráva-----
Od: Joerg Heinicke [mailto:jheinicke@virbus.de] 
Odesláno: 27. novembra 2003 21:04
Komu: users@cocoon.apache.org
Předmět: Re: cocoon with servlet Filter - running twice

I wonder how Cocoon (= a servlet) should influence servlet container 
behaviour? Isn't the filtering independent on the things the servlet 
does? Are you sure that not two requests are sent (e.g. using Adobe PDF 
plugin with IE)?

Joerg

On 27.11.2003 11:41, Roman Hrivik wrote:
> Hi
> 
> I put simple test filter before cocoon servlet.
> 
> But I have a problem with it, because my Filter runs twice.
> I run Cocoon on oracle OC4J.
> There is just simple System.out.print in my filter just count the runs
> 
> 	int runs=0;
> 	public void doFilter(
> 		ServletRequest request,
> 		ServletResponse response,
> 		FilterChain chain)
> 		throws IOException, ServletException {
> 
>         System.out.println("========= TestFilter " + ++runs + "
> =========");
>         chain.doFilter(request, response);
> 
> 	}
> 
> 
> When I tested filter on other servlets than cocoon everything was OK.
> But when I mapped my filter to Cocoon servlet my filter runs twice.
> 
> Can anybody help ?
> 
> Thks.
> 
> Roman


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: cocoon with servlet Filter - running twice

Posted by Joerg Heinicke <jh...@virbus.de>.
I wonder how Cocoon (= a servlet) should influence servlet container 
behaviour? Isn't the filtering independent on the things the servlet 
does? Are you sure that not two requests are sent (e.g. using Adobe PDF 
plugin with IE)?

Joerg

On 27.11.2003 11:41, Roman Hrivik wrote:
> Hi
> 
> I put simple test filter before cocoon servlet.
> 
> But I have a problem with it, because my Filter runs twice.
> I run Cocoon on oracle OC4J.
> There is just simple System.out.print in my filter just count the runs
> 
> 	int runs=0;
> 	public void doFilter(
> 		ServletRequest request,
> 		ServletResponse response,
> 		FilterChain chain)
> 		throws IOException, ServletException {
> 
>         System.out.println("========= TestFilter " + ++runs + "
> =========");
>         chain.doFilter(request, response);
> 
> 	}
> 
> 
> When I tested filter on other servlets than cocoon everything was OK.
> But when I mapped my filter to Cocoon servlet my filter runs twice.
> 
> Can anybody help ?
> 
> Thks.
> 
> Roman


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org