Try using a Thread.sleep( long millis ) , ie; 1000 * 60 * 5 = 5 min.
while ( cont == true )
{
try
{
Thread.sleep( 1000 * 60 * 5 ); //5 minutes
// ,,, the db.axx code and all that goes with it.
}
catch ( InterruptedException )
{
//discontinue loop or contact starfleet hq.
}
}
why would you like to be sending the data to a jsp-file every five minutes?
do you intended to automatically reload the page every five minutees? in
that case, you may simply accomplish that with javascript.
Best Regards,
//Adrian Papari
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Henki Lubis
Sent: 29 January 2001 04:35
To: [EMAIL PROTECTED]
Subject: Timer problem ...
Hi All...
How can i make every 5 minutes my class file will getting data from a
databse and send it to my jsp files ???
This is what i wanna do actually :
For (every 5 minutes ) do
{
_sql = Select * from test;
rs = Query(_sql);
}
thx for your help.
a Beginner.
~ HL ~
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets