W3C home > Mailing lists > Public > www-jigsaw@w3.org > March to April 1999

Re: Filters on Servlets?

From: Benoit Mahe <Benoit.Mahe@sophia.inria.fr>
Date: Mon, 12 Apr 1999 10:32:54 +0200
Message-ID: <3711AFB5.71ABD8F2@sophia.inria.fr>
To: agillespie@rightware.com
CC: Benoit.Mahe@sophia.inria.fr, alex@shop.com, www-jigsaw@w3.org
Art Gillespie wrote:

> Thanks for the help guys,
>
> I was originally hoping that Jigsaw read the content-type of
> all returned HTTP objects and applied the appropriate
> filter.  With the exception of servlets, is this how it
> works or does jigsaw decide the mime type by the extension?

Yes, the extension is the criteria. But you can specify a content type
manually with JigAdmin. For more details read the indexer
documentation [1].

[1] http://www.w3.org/Jigsaw/Doc/User/JigAdmin/indexers.html

Regards, Benoit.

>
> At any rate, I've written a simple ResourceFilter called
> XMLFilter that transforms XML to HTML (or whatever) using
> the XML stylesheet pi from the requested document.  It uses
> the XSLP library and IBM's XML parser.  You can get it at
> ftp://ftp.i-no.com/pub/xmlfilter.jar
>
> You'll have to recompile the XMLFilter.java file since I
> hard-coded the document base.
>
> Comments appreciated.
>
> Art
>
> Benoit Mahe wrote:
> > Of course, but this wouldn't be consistant with
> > the way Jigsaw
> > apply filters on other resources. Jigsaw was not
> > designed for
> > servlets, this is just a useful extension.
> >
> > Regards, Benoit.
> >
> > "S. Alexander Jacobson" wrote:
> >
> > > You could get around this by setting a socket
> > factory or wrapping the
> > > sockets passed to the servlet...
> > >
> > > -Alex-
> > >
> > > On Fri, 9 Apr 1999, Benoit Mahe wrote:
> > >
> > > > Ok I see. The OutputFilter method of Filters
> > can't be called on servlets
> > > > because servlet write the reply directly on
> > the Socket.
> > > > There is no solution for that, sorry.
> > > >
> > > > Regards,Benoit.
> > > >
> > > > Art Gillespie wrote:
> > > >
> > > > > Benoit,
> > > > >
> > > > > I have attached a filter called XMLFilter
> > directly to the
> > > > > ServletWrapperFrame for a Servlet Resource
> > entitled
> > > > > XMLServlet.  I know the XMLFilter class works
> > because I also
> > > > > have it associated with the .xml extension,
> > and it works
> > > > > fine on files.
> > > > >
> > > > > I've put a debug line at the top of the outgoin
> > gFilter()
> > > > > method in XML filter like so:
> > > > >
> > > > > System.out.println("OUTGOING FILTER CALLED");
> > > > >
> > > > > When I call xml files, I see the appropriate
> > debug output at
> > > > > the console.  However, when I call XMLServlet,
> > I don't see
> > > > > it, leading me to believe that the outgoingFilt
> > er method is
> > > > > not being called after calling the servlet.
> >  Instead, the
> > > > > output of the Servlet is sent directly to
> > the browser.
> > > > >
> > > > > Any ideas why this method isn't being called?
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Art
> > > > >
> > > > > Benoit Mahe wrote:
> > > > > > The filter MUST be attached to the ServletWra
> > pperFram
> > > > > > e, and this
> > > > > > works.
> > > > > >
> > > > > > Regards, Benoit.
> > > > > >
> > > > > > Art Gillespie wrote:
> > > > > >
> > > > > > > Is it possible to place a filter on a
> > ServletWrappe
> > > > > > r?  I've
> > > > > > > tried to do it the same way you would
> > with an
> > > > > > HTTPFrame, but
> > > > > > > it doesn't seem to work.
> > > > > > >
> > > > > > > ?
> > > > > > >
> > > > > > > Art
> > > > > > >
> > > > > > > ___________________________________________
> > ________
> > > > > > ______
> > > > > > > Better than free email:  shared calendar,
> > files,
> > > > > > and more...
> > > > > > > Get your 'Visto Briefcase' at http://www.vi
> > sto.com/
> > > > > > info
> > > > > >
> > > > > > --
> > > > > > - Benoît Mahé -------------------------------
> > --------
> > > > > > ----------------
> > > > > >                       World Wide Web Consorti
> > um
> > > > > >   (W3C)
> > > > > >                     Architecture domain
> > - Jigsaw
> > > > > > Engineer
> > > > > >
> > > > > >              http://www.w3.org/People/Mahe
> > > > > > - bmahe@w3.org
> > > > > > ---------------------------------------------
> > --------
> > > > > > ----------------
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > > _______________________________________________
> > __________
> > > > > Better than free email:  shared calendar,
> > files, and more...
> > > > > Get your 'Visto Briefcase' at http://www.visto.
> > com/info
> > > >
> > > > --
> > > > - Benoît Mahé -----------------------------------
> > --------------------
> > > >                       World Wide Web Consortium
> >   (W3C)
> > > >                     Architecture domain - Jigsaw
> > Engineer
> > > >
> > > >               http://www.w3.org/People/Mahe
> >  - bmahe@w3.org
> > > > -------------------------------------------------
> > --------------------
> > > >
> > > >
> > > >
> > >
> > > ___________________________________________________
> > ________________
> > > S. Alexander Jacobson                   Shop.Com
> > > 1-212-697-0184 voice                    The Easiest
> >  Way To Shop
> >
> > --
> > - Benoît Mahé ---------------------------------------
> > ----------------
> >                       World Wide Web Consortium
> >   (W3C)
> >                     Architecture domain - Jigsaw
> > Engineer
> >
> >                http://www.w3.org/People/Mahe
> > - bmahe@w3.org
> > -----------------------------------------------------
> > ----------------
> >
> >
> >
> >
>
> _________________________________________________________
> Better than free email:  shared calendar, files, and more...
> Get your 'Visto Briefcase' at http://www.visto.com/info

--
- Benoît Mahé -------------------------------------------------------
                      World Wide Web Consortium   (W3C)
                    Architecture domain - Jigsaw Engineer

                http://www.w3.org/People/Mahe  - bmahe@w3.org
---------------------------------------------------------------------
Received on Monday, 12 April 1999 04:33:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:29 GMT