Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Listeners Vs Filter

 
Santosh Kumar
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic