No you can't really do a redirect from the filter. All the filter can do is alter the request/response/session However, what you an do i a filter for servlet /xyz that, under certain conditions, don't call the rest of filter chain but immediatly tells the browser (HTTP moved temporarily status code) to reissue same request to /abc. This is not an internal server redirect, you ask browser to reattempt operation somewhere else.
You could do an internal redirect (request -> requestDispatcher -> forward), but it would short circuit the filter chain, some important filter might not be executed.. The forward is, i think, supposed to happend after full filter chain has been executed. Erica Zhang a écrit : > Hi, > > Thanks a lot for Thomas and Tim. I know an overview about filter for > requests and responses. Now, I am not very clear if a filter could > redirect the requests from one servlet, which is originally to handle > the request, to another servlet, which is really to handle the > request after the redirection? > > Thanks, > > Erica > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]