Forums Register Login

How many instances of a Servlet filter will there be within the container

+Pie Number of slices to send: Send
Supposed I have a LoginFilter, defined the usual way:

public class LoginFilter implements Filter, Servlet {


Its executed for every URL that goes through the container (tomcat, 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?
+Pie Number of slices to send: Send
the default is one instance per jvm
You've gotta fight it! Don't give in! Read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 2395 times.
Similar Threads
Doubt in running Filters
Servlet Filter problems
Filter to check if user is logged in
Problem invoking filter
[Solved][HFSJ] Filter Preferences
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 17:17:11.