File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes filter across context Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "filter across context" Watch "filter across context" New topic
Author

filter across context

Tom Henricksen
Ranch Hand

Joined: Mar 23, 2004
Posts: 136

Can you setup a filter to go across different context or at a server level? Or is there another mechanism that could do this in EE java?
Thanks,
Tom
Charles Lyons
Author
Ranch Hand

Joined: Mar 27, 2003
Posts: 836
What's the specific reason?

If it's authentication you're after, using container authentication (if that's appropriate) will work across all containers in the same J2EE instance.

In general though, I think the answer is probably no. Please be a bit more specific, I'm intrigued...


Charles Lyons (SCJP 1.4, April 2003; SCJP 5, Dec 2006; SCWCD 1.4b, April 2004)
Author of OCEJWCD Study Companion for Oracle Exam 1Z0-899 (ISBN 0955160340 / Amazon Amazon UK )
steve souza
Ranch Hand

Joined: Jun 26, 2002
Posts: 852
I haven't tried it myself, but I have been told that tomcat has a web.xml file in the same directory as server.xml. When tomcat starts up it applies this file to all applications. If you put a servlet filter reference in this file and have any code that it executes in the server classpath then you should have to install the filter everywhere. Also, if the filter has some static reference then all apps would see the same data too, so you should be able to do pretty much what you want with these capabilities (assuming you use tomcat).


http://www.jamonapi.com/ - a fast, free open source performance tuning api.
JavaRanch Performance FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: filter across context
 
Similar Threads
ApplicationContext
context-param in web.xml
crosscontext
I want to filter some javaranch pages for reading?
WA #1.....word association