W3C home > Mailing lists > Public > www-jigsaw@w3.org > January to February 1999

Re: Servlet invoking

From: Benoit Mahe <Benoit.Mahe@sophia.inria.fr>
Date: Thu, 04 Feb 1999 09:41:15 +0100
Message-ID: <36B95D2B.DA1D570F@sophia.inria.fr>
To: Phil <phil@tcp.net.au>
CC: Jigsaw mailing list <www-jigsaw@w3.org>
I think you can do that with a specific indexer [1] and the RedirecterFrame [2].
Configure your new indexer to create FileResource[3] associated to a
RedirecterFrame for html files (or gif, jpg, txt ...). In Redirecter frame set the
target field to the internal StatusServlet URL. Then each request on files under
the DirectoryResource[4] associated with your new indexer will be redirected on
your servlet (The Header Referer will contains the original resource URL).

[1] http://www.w3.org/Jigsaw/Doc/User/indexers.html
[2] http://www.w3.org/Jigsaw/Doc/Reference/org.w3c.jigsaw.frames.RedirecterFrame.html
[3] org.w3c.tools.resources.FileResource
[4] org.w3c.jigsaw.resources.DirectoryResource

Regards, Benoit.

Phil wrote:

> I apologise if this is a newbee question, I'm still getting a handle on the way Jigsaw works. Thanks in advance to whoever will help.
> I want a particular servlet to be called whenever a resource is requested from a particular directory, or any sub directory of that directory.
> ie.
> The servlet is called "StatusServlet" and the invoke directory is called "admin".
> eg.
> http://host/admin/index.html
> Inside the admin directory is the text documnent "index.html" as shown in the URL above. Instead of returning index.html directly, the StatusServlet will be invoked and will return "index.html" after some processing.
> eg.
> http://host/html/subsection/admin/server/status.html
> Here the admin directory is deeper but the same applies. The "status.html" document exists in the "server" sub-directory of the "admin" sub-directory of the "etc...
> However, because "status.html" is in a sub-directory of admin, the StatusServlet should be called.
> I can't figure the documentation just yet... can anyone help?
> Thanks,
> Phil Blake

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

  http://www.w3.org/People/Mahe - bmahe@w3.org - +
Received on Thursday, 4 February 1999 03:41:24 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:33 UTC