You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Marten Lehmann <le...@cnm.de> on 2005/07/27 19:04:33 UTC

injecting a new request within a filter

Hello,

from within a filter, I'm trying to do the following:

request.getRequestDispatcher(req.getServletPath() + 
"index.faces").forward(request, response);

This works generally fine. The problem is, that attached filters simply 
aren't processed for this request. I have two filters in series, the 
first filter is doing the above forward-request on a conditionally basis 
and the second filter is never called in this case. How can I re-inject 
the request, so that either both filters are passed again, or at least 
the second filter (and maybe others following) is processed?

Regards
Marten

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: injecting a new request within a filter

Posted by Marten Lehmann <le...@cnm.de>.
Hello,

> 1) You need to be running tomcat 5
> 2) See SRV.6.2.5 Filters and the RequestDispatcher in the servlet spec - 
> it discusses exactly what you need to do.

thanks, it works as I expected it to work now.

Regards
Marten

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: injecting a new request within a filter

Posted by Tim Funk <fu...@joedog.org>.
1) You need to be running tomcat 5
2) See SRV.6.2.5 Filters and the RequestDispatcher in the servlet spec - it 
discusses exactly what you need to do.

-Tim

Marten Lehmann wrote:

> Hello,
> 
> from within a filter, I'm trying to do the following:
> 
> request.getRequestDispatcher(req.getServletPath() + 
> "index.faces").forward(request, response);
> 
> This works generally fine. The problem is, that attached filters simply 
> aren't processed for this request. I have two filters in series, the 
> first filter is doing the above forward-request on a conditionally basis 
> and the second filter is never called in this case. How can I re-inject 
> the request, so that either both filters are passed again, or at least 
> the second filter (and maybe others following) is processed?
>  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org