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

Re: Setting index page to servlet

From: Benoit Mahe <Benoit.Mahe@sophia.inria.fr>
Date: Thu, 30 Mar 2000 10:11:51 +0200
Message-ID: <38E30C47.54CBEF0F@sophia.inria.fr>
To: Dennis Sosnoski <dms@sosnoski.com>
CC: jigsaw <www-jigsaw@w3.org>
Dennis Sosnoski wrote:

> I've written a simple servlet to handle dispatching a request to one of two
> pages depending on the User-Agent string. I want this servlet to be my default
> root page.
>
> I first added the class file (DefaultServlet.class) under root/servlet and added
> a ServletWrapper for the servlet. I could then access the servlet directly from
> a browser as localhost/servlet/DefaultServlet, so I tried editing the Root
> resource and changing the HTTPFrame to specify /servlet/DefaultServlet as the
> Index. I tried a few variations on this, but couldn't get it to work - instead,
> I'd receive a directory listing of my root directory.

The index file is supposed to be in the directory itself, not in a sub directory.

> Next I added a Default resource under Root as a FramedResource, then added a
> ServletMapperFrame to that, specifying the servlet-url as
> /servlet/DefaultServlet. This works fine for both web browser and phone browser
> clients - unfortunately, after I save the configuration, stop the servers from
> JigAdmin, and then restart, the HTTPFrame under Root is changed back to
> Overview.html. I'd like to be able to have this configuration restore properly
> without having to go in and set it with JigAdmin every time I restart the
> server.

It's not a good thing to modify the root resource, you should create a new resource
(FramedResource associated to a ServeltMapperFrame) and declare it as the new root
resource (in general properties).

Regards, Benoit.

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

                http://www.w3.org/People/Mahe  - bmahe@w3.org
---------------------------------------------------------------------
Received on Thursday, 30 March 2000 03:12:10 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:14:07 UTC