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

Re: Stupid question about properties URL

From: Benoit Mahe <Benoit.Mahe@sophia.inria.fr>
Date: Fri, 30 Apr 1999 17:34:29 +0200
Message-ID: <3729CD85.E66CB3F0@sophia.inria.fr>
To: Luc Saint-Elie <lse@imaginet.fr>
CC: www-jigsaw@w3.org
Luc Saint-Elie wrote:

> Well.. my english is..
>
> I don't want to access this file by Java code.
> What I have to do is to set up a servlet properties (in Jigsaw admin)
> The property is a file url (the url of a file named cocoon.properties)
> I just have to pen the servlet property dialog in JigAdmin and set up the
> property (like in
> http://www.w3.org/Jigsaw/Doc/User/servlets.html#parameters)

Ok, I understand now ;-)

> I don't know exactly if
>
> - This URL is relative to Jigsaw
> - This URL is relative to the directory where my .jar file (the one that
> contains the servlet) is situated, because my servlet is not a .class file
> located in the /servlet directory but a .
> - This URL is relative to Jigsaw itself

Well, it depends on the servlet only, so use the absolute PATH.

> And as I use Windows (not unix alas)
>
> If I have to use
> - the "Bill way to write path" (D:\foo\bar\stuff\cocoon.properties)

That's the good way I think, but, one more time, it depends on the servlet.
When you specify parameters in ServletWrapper, enter them before the
servlet class, because when the servlet class is specified, the class is loaded
and the init method called. You can also restart Jigsaw.

Regards, Benoit.

>
> - The Unix way to write path (/foo/bar/stuff/cocoon.properties)
> - Another method (like D:\\foo\\bar\\stuff\\cocoon.properties)
>
> Le 16:56 30/04/99 +0200, Benoit Mahe a écrit:
>
> >> How does Jigsaw handle the path under windows 98 ?
> >> I have a path to set up for a servlet properties.
> >
> >Ok, but what do you do with this path? new File(), getResource()?
> >If you are using getResource
> >
> >URL url = getClass().getClassLoader().getResource("cocoon.properties")
> >should works. This is relative to the servlet directory.
>
> +------------------------------------------------+
> | Luc Saint-Elie                                 |
> | 53, rue Caulaincourt                           |
> | 75018  Paris France                            |
> | Tel: 01 42 52 09 62 / 06 12 90 19 65           |
> | email : luc@interpasnet.com                    |
> +------------------------------------------------+
> | Servlet Taverne a site devoted to servlets     |
> | ..and Java server side technologies            |
> |           ATTENTION NEW URL !!!                |
> | url : http://www.interpasnet.com/JSS           |
> +------------------------------------------------+

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

                http://www.w3.org/People/Mahe  - bmahe@w3.org
---------------------------------------------------------------------
Received on Friday, 30 April 1999 11:34:34 GMT

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