File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Java Products and Servers and the fly likes Glassfish V3.0.1 Filter initialization problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Glassfish V3.0.1 Filter initialization problem" Watch "Glassfish V3.0.1 Filter initialization problem" New topic
Author

Glassfish V3.0.1 Filter initialization problem

Robe Eleckers
Greenhorn

Joined: Jul 08, 2009
Posts: 9
Hello,

I have a custom Filter with the main purpose of user login checking. If a user is not logged in the request will be redirected to a login page. Another purpose is initialization of server side logfiles. This second step we do in the init method of the Filter. Now the weird thing is that with Tomcat the Filter.init method is called directly on startup, with Glassfish v3 prelude this is also the case, so starting op the application calls the Filter.init method even before an URL request is done by the client.

With Glassfish V3.0.1 however this is not the case, the init method is not called on startup. Does anybody know why this is or how I can change this behaviour? Maybe there is an option in Glassfish to influence this behaviour, but I could not find it. Also checked the glassfish issue tracker and could not find anything about this.

Any help is appreciated.
 
Consider Paul's rocket mass heater.
 
subject: Glassfish V3.0.1 Filter initialization problem
 
Similar Threads
Can't get my login servlet to be called
Filter URL mappings
HFS -Filters and Wrappers-page 699
Filter initialization doubt
Instantiating Servlet