File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
EJB and other Java EE Technologies
How many instances of a Servlet filter will there be within the container
Joined: Aug 11, 2007
Aug 01, 2012 22:46:38
Supposed I have a LoginFilter, defined the usual way:
public class LoginFilter implements Filter,
Its executed for every URL that goes through the container (
, glassfish, etc.)
How many "LoginFilter" objects are in the VM? Just one? one per thread? perhaps a pool is kept by the container and managed by it?
Related: does the LoginFilter have to be thread safe?
Joined: Oct 21, 2008
Aug 15, 2012 05:03:38
the default is one instance per jvm
SCJP 5 , SCWCD 5, SCEA 5
It is sorta covered in the
JavaRanch Style Guide
subject: How many instances of a Servlet filter will there be within the container
[Solved][HFSJ] Filter Preferences
Problem invoking filter
Servlet Filter problems
Filter to check if user is logged in
Doubt in running Filters
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014