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 16:56:34 +0200
Message-ID: <3729C4A2.CF43E3D@sophia.inria.fr>
To: Luc Saint-Elie <lse@imaginet.fr>
CC: www-jigsaw@w3.org
Luc Saint-Elie wrote:

> Well lucky you, its time for our regular feature "the stupid question of
> the day"
>
> 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.

Regards, Benoit.

> In fact the servlet is a
> .jar file so I have set up the servlet wrapper.
> My jar file is in c:\jdk\jre\lib\ext
> I have no problem to access it.. but it has a big problem in accessing the
> properties file
>
> In this case is the path :
> - relative to the JDK path (in my case the jdk\jre\lib\ext directory ?
> - relative to my Jigsaw install directory ?
> - relative to my Jigsaw\jigsaw\www\servlet directory ?
>
> And how is this parth (the path I have to enter in the servlet properties
> dialog) spelled
>
> The physical file path is d:\jigsaw\jigsaw\www\servlet\cocoon.properties
>
> do I need to use unix bakslah ? double slash ?....
>
> Thanks in advance
> +------------------------------------------------+
> | 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 10:56:42 GMT

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