Hello !

My servlet opens a database connexion when started (in init()) only and I
want him to close and reopen the connexion if inactivity is more than one
hour. But HOW TO GET THE DIFFERENCE BETWEEN TWO DATES ???

    java.util.Date datenow = new java.util.Date();
    out.println("Date now : " + datenow.toString());
    out.println("Last dbase access : " + datedb.toString());
    datedb = new java.util.Date();

And then ?????

     new date = datedb - datenow ????

And why do I have to say "java.util.Date" and not simply "Date" ???

Denis

--

Denis Bucher,   /  [EMAIL PROTECTED]       T�l. +41-22-8000625   \  Internet
Horus Networks /  horus-networks.com    Fax: +41-22-8000622   \  Services
              /  http://www.horus.ch   US Fax: (508) 437-1261  \  Provider

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to