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]

Reply via email to