wrote:
> Hello,
>
> I was just told about servlet filters. Is a new servlet filter
> instantiated per request?
No. The lifecycle of a filter is similar to that of a servlet. One
instance per VM, multithreaded.
> Also, when is the "doFilter" method called
> in relation to the filtered servlet's "service" method?
The filter gets called first, then should chain to any other filters via
the FilterChain's doFilter method. If it's the last filter in the chain,
doFilter will pass control to the servlet's service method.
Luke