aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Listeners Vs Filter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Listeners Vs Filter" Watch "Listeners Vs Filter" New topic
Author

Listeners Vs Filter

Santosh Kumar
Greenhorn

Joined: Jan 03, 2008
Posts: 5
We have 8 Listeners. I am concerned with ServletRequestListener.

I think both the filter and request listener is working similarly. So which is the best.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41905
    
  63
Welcome to JavaRanch.

The difference is that the filter has access to the servlet response (in addition to the servlet request), and can actually alter both request and response.

The request listener is really just a notification mechanism - it can't be used to change the request processing.


Ping & DNS - my free Android networking tools app
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

Originally posted by Santosh.Kumar RSI:
We have 8 Listeners. I am concerned with ServletRequestListener.

I think both the filter and request listener is working similarly. So which is the best.


Howdy "Santosh.Kumar RSI",

Welcome to JavaRanch

Kindly adjust your display name according to the ranch's naming policy.

You can do so by editing your profile.


Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Listeners Vs Filter