Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2005

Tip: Looking for answers? Try searching our database.

Anyone know the difference between Tomcat Valve and Filter?

Thread view: 
jacksuyu@gmail.com - 04 Nov 2005 23:35 GMT
Seems both could be hooked before servlet be called.

Does Valve work for more than just java servlet/jsp?

Thanks.
Adam Maass - 05 Nov 2005 04:46 GMT
> Seems both could be hooked before servlet be called.
>
> Does Valve work for more than just java servlet/jsp?

Similar in notion, but at different levels.

"Valve" is Tomcat's specific notion, and they get applied at a higher level
than anything in a specific webapp. Also, they work only in Tomcat.

"Filter" is a Servlet Specification notion and should work in any compliant
servlet container. They get applied at a lower level than all of Tomcat's
Valves.

-- Adam Maass
jacksuyu@gmail.com - 05 Nov 2005 16:24 GMT
Got it, thanks.
So if I want approach to work cross different application server, i
need to use Filter.
Juha Laiho - 06 Nov 2005 09:36 GMT
jacksuyu@gmail.com said:
>So if I want approach to work cross different application server, i
>need to use Filter.

Yep. However, consider also the division between your application and the
application server. Think whether the feature you're planning is part of
your application, or is it rather a generic feature of the application
server, which could have uses in other applications as well.

This would be the correct criteria to decide between Valve and Filter.
Signature

Wolf  a.k.a.  Juha Laiho     Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
        PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.