• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

init method from a filter

 
Oliver Rensen
Ranch Hand
Posts: 109
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ranchers,

when does the init method from a filter will run?

When the web-app is deployed, or the first time, a servlet is called,
that is mapped to this filter?

Regards,
Oliver
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's up to the servlet container, although probably just before it is first invoked. Note that there's no guarantee that there will only ever be a single instance of the filter. In other words, "init" may be called multiple times, each time for a different instance of the filter.
 
Oliver Rensen
Ranch Hand
Posts: 109
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf, thank you for the reply.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic