Re: Stupid question about properties URL

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 UTC