Re: Access to a database with a configuration file

2004-12-04 Thread Philippe PONSONNET
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

Re: Access to a database with a configuration file

2004-12-04 Thread ichy
Hi, Philippe. (B (B>But I have a problem when I want to load the database.xml file : I can't get (B>its path when my webapp is loaded. (B> (B>The instruction getClass().getResource(".").getFile() always return null. (B> (B> (B> (B>How could I do ? (B (Bif your question is how to load xm

RE: Access to a database with a configuration file

2004-12-04 Thread Freddy Villalba A.
[mailto:[EMAIL PROTECTED] Enviado el: sábado, 04 de diciembre de 2004 14:02 Para: Struts Users Mailing List Asunto: Re: Access to a database with a configuration file I have already seen the hibernate framework but I prefere to not use an OR for beginning. I would like to only use my very simple Dat

Re: Access to a database with a configuration file

2004-12-04 Thread Vic
Philippe PONSONNET wrote: I have already seen the hibernate framework but I prefere to not use an OR for beginning. I would like to only use my very simple Database class. I suppose it is possible to load this xml file by by a specific way, isnt-it ? iBatis is not O/R! It's SQL or E/R. I do no

Re: Access to a database with a configuration file

2004-12-04 Thread Philippe PONSONNET
I have already seen the hibernate framework but I prefere to not use an OR for beginning. I would like to only use my very simple Database class. I suppose it is possible to load this xml file by by a specific way, isnt-it ? --- Vic <[EMAIL PROTECTED]> a écrit : > Consider reading iBatis Stu

Re: Access to a database with a configuration file

2004-12-04 Thread Vic
Consider reading iBatis Sturts jPetStore on DAO or Rick Reumans Struts How to DAO tutorial. (DAO = Data Base Access) .V Philippe PONSONNET wrote: This solution seems to be not possible because my Database class is not a Servlet but a classic class. Is it possible to load my resource Database.xml

Re: Access to a database with a configuration file

2004-12-04 Thread Philippe PONSONNET
This solution seems to be not possible because my Database class is not a Servlet but a classic class. Is it possible to load my resource Database.xml with the web.xml descriptor file ? And how could I load it with my Database class ? Thanks --- Niall Pemberton <[EMAIL PROTECTED]> a écrit :

Re: Access to a database with a configuration file

2004-12-03 Thread Niall Pemberton
You could use the ServletContext's getInputStream("fileName") method Niall - Original Message - From: "Philippe PONSONNET" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, December 04, 2004 12:35 AM Subject: Access to a database with a configuration file > Hello, > > > > I w