±è¼º°ü wrote:

> Hi everyone~~
>
> I'd like to know that Tomcat4.0 can support MIME-type filter.
>
> and if it does, how to config and use?

There are no MIME-type filters built in to Tomcat 4.0, but you could easily
create such a thing, using two different techniques:

* Write a custom Valve implementation that
  wrapped all the requests and responses to
  a web app, and did the filtering if a matching
  MIME type was encountered.  (For any other
  MIME type, the data would be passed through
  unchanged).

* Since Tomcat 4.0 supports the servlet 2.3
  proposed final draft APIs, you can also write
  a javax.servlet.Filter to do the same thing.  The
  advantage here is that your Filter will be portable
  to any servlet container that supports 2.3, not
  proprietary to Tomcat.

Do you have a particular type of filtering in mind?  It would probably be useful
to include an example Filter that does something like this in the Tomcat
distribution.

Craig McClanahan



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to