Link to home
Start Free TrialLog in
Avatar of tims
tims

asked on

How to wait on a servlet or non threaded app?

I would like to use an equivalent of the wait(long) method used by threads but it is a servlet.  I don't really want to create a thread just for this since it brings in all the servlet/thread problems.

Do anyone know of a reliable method for sleeping/waiting for a given number of millimeconds?

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Venci75
Venci75

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of heyhey_
heyhey_

usually
Thread.sleep(long);
is enough :)
Avatar of tims

ASKER

Perfect.  Thanks.
> I would like to use an equivalent of the wait(long) method used by threads but it is a servlet

btw. your questions shows that you do not have the slightest idea what wait() / notify() are designed for. take a look at some tutorial on Java synchronization.