tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonas Bosson <>
Subject Re: Re: Cocoon interceptor inside Tomcat?
Date Thu, 21 Sep 2000 08:52:26 GMT

Thanks Craig and Costin!

What I will do:

1. I have set up a BufferedHttpServletResponse for the current implementations of
  jsdk and tomcat. It traps the buffer (more controlled than the BufferedServletOutputStream)
  (it will be a bit like beforeCommit - but with a wrapper since a beforeCommit - interceptor
   won't have much access to the stream or the buffer.)
2. Create a cocoon filter (Craig's recommendation) in servlet 2.3 
   (and learn how much is implemented in dev-tomcat...)

The goal is have a XML-server that supports Webb-DAV and remote Access Control.
It takes a lot of fiddling, but the result would be a distributed file system and
web site that understands different user agents. I have not yet seen DAV implemented
in TomCat so I use Apache and mod_dav. But then the jserv - would have to create
a filtering pipe from an ActionHandler in Apache and I don't see the solution for that
yet. The implementation in apache would be something like "mod_include" - but for 
servlet filtering on content-type / other attribute. And I have seen nothing about
that. But perhaps the nearly started mod_java - project at

It's a puzzle. But it should work... ;-)

Jonas Bosson wrote:
> > The RequestInterceptor architecture in Tomcat 3.2 isn't really set up to
> > intercept the output stream in the way you would need to do this easily.
> > You can change the headers in the beforeBody() entry point, but it's
> > difficult to replace the output stream itself unless you build a custom
> > Response implementation further up the request processing pipeline and
> > modify the connectors to use your implementation instead.
> beforeCommit() is there just for that :-)
> ( it is supposed to work in the same way as IIS output
> filters. Apache filters are a bit more complex - and more powerfull ,
> probably in 3.4. Let me know if you have any problems with it )
> Costin
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message