Newbie trying to understand Core J2EE Patterns - Intercepting Filter

Hello Everyone,

I'm new to JavaEE Filters , and I'm trying to learn them from here:

http://java.sun.com/blueprints/corej2eepatterns/Patterns/InterceptingFilter.html

So far I've understood everything up until "Intercepting Filter sequence diagram "

Now I'm trying to understand the "Example 7.1 Implementing a Filter - Debugging Filter "

The DebuggingFilter class is implementing from the Processor interface, but the Processor interface is not defined anywhere.

I also looked for the Processor interface in the JavaSE6 and JavaEE 5 API , but the only one defined in JavaSE6 is:

javax.annotation.processing.Processor

which is not what the article is talking about I think.

Am I missing something?

Any help / pointers is appreciated.

[808 byte] By [appy77a] at [2007-11-27 4:54:16]
# 1

The processor class is not part of API. There it was mentioned an alternate approach than using the API provided filter interface.

Here Processor is an interface with a method signature as

public void execute(ServletRequest req,

ServletResponse res) throws IOException,

If you are using API the your filter class implements javax.servlet.Filter , in the same way if you are not using API and developing your own framework your filter will implement Processorclass shown in the example given.

But this is not at all a good practice to use custome filters.

sridhar_ratnaa at 2007-7-12 10:08:53 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

> The processor class is not part of API. There it was

> mentioned an alternate approach than using the API

> provided filter interface.

>

> Here Processor is an interface with a method

> signature as

> public void execute(ServletRequest req,

>ServletResponse res) throws IOException,

> If you are using API the your filter class implements

> javax.servlet.Filter , in the same way if you are not

> using API and developing your own framework your

> filter will implement Processorclass shown in the

> example given.

>

> But this is not at all a good practice to use custome

> filters.

thanks for your reply, yes I read that it is not good practice to use custom filters.

I was planning to buy the book core j2ee patterns but I was hoping that the examples in it would be concrete examples and incomplete ones.

I don't know if they are concrete or not.

Anyway, I'm giving you the dukes for your reply.

Thank you.

appy77a at 2007-7-12 10:08:53 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...