GNU-Papeclips has made an attempt to solve this problem with a called
servlet filtering.

A servlet can be defined as a filter but it remains a servlet.

Filters have an extra method filter(ServletRequest,ServletResponse)
which is called when they are being used as filters.

The way Paperclips works you can then use a filter by it's servlet
path.

Eg: if I have a filter servlet assigned to the path
   /authorise
then I can set another servlet to have the filter
/authorise?store=ldap
This means that the servlet assigned to the /authorise path gets the
servlet request before the servlet the path indicates. It also ensures
that the parameter pair store=ldap is in the request parameters for
the filter.

Filters have the power to alter the request and response objects that
the filtered object will recieve.

At the moment it only works with a single filter but I have plans to
introduce multiple filters (the hardest part is making the alteration
of the request/response objects work in this environment).

It's not perfect but I find it quite a usefull modularisation tool.




Nic Ferrier
Tapsell-Ferrier Ltd
www.tapsellferrier.co.uk


>>> James Duncan Davidson <[EMAIL PROTECTED]> 6/24/99
6:37:49 PM >>>
> Is servlet chaining specific feature of JavaWebServer ?

Servlet chaining was introduced in JWS.

> Can every other servlet engine can do servlet chaining ?

No - some do, some don't

> <if not:will it be supported by every servlet engine ?>

I hope not. Servlet chaining is an evil thing that was never, and
will
never be, part of the servlet api specification. It's hard to write
a
servlet that can be both a head servlet and a chained servlet -- in
fact, to do it where it will exhibit correct behavior 100% of the
time
is damned near impossible (speaking from personal experience from my
JWS
days). There's more about it in the jserv-interest archives from a
year
or so back.

.duncan

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in
the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html

Resources:
http://java.sun.com/products/servlet/external-resources.html

LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to