Hi Ichy.
Thanks a lot for your answer !! You have resolved my
problem. I had put a lot of different path in the
getResource() method but not the one which takes a
slash at the begining of the path :-/
Now all is ok and I don't need any O/R framework.
Mille mercis.
Philippe
--- ichy <[EMAIL PROTECTED]> a �crit :
> Hi, Philippe.
>
> >But I have a problem when I want to load the
> database.xml file : I can't get
> >its path when my webapp is loaded.
> >
> >The instruction
> getClass().getResource(".").getFile() always return
> null.
> >
> >
> >
> >How could I do ?
>
> if your question is how to load xml file, put your
> databese.xml
> in classpath such as /WEB-INF/classes, /WEB-INF/lib,
> then
>
> Class#getResource() will find it.
>
> i often put property file for my web application in
> /WEB-INF/classes and load it at startup like
>
> InputStream is =
>
anInstance.getClass().getResourceAsStream("/myapp.properties");
> Properties props = new Properties();
> props.load( is );
>
> is this what you want for your database class?
>
> ichy
>
>
>
>
> Love, Peace, Email. http://www.Jmail.co.jp
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
D�couvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails !
Cr�ez votre Yahoo! Mail sur http://fr.mail.yahoo.com/
Avec Yahoo! faites un don et soutenez le T�l�thon en cliquant sur
http://www.telethon.fr/030-Don/10-10_Don.asp
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]