Solved

How to wait on a servlet or non threaded app?

Posted on 2002-04-19
4
158 Views
Last Modified: 2013-11-24
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.
0
Comment
Question by:tims
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
Venci75 earned 50 total points
ID: 6953304
Thread.currentThread().sleep(long);
0
 
LVL 16

Expert Comment

by:heyhey_
ID: 6953359
usually
Thread.sleep(long);
is enough :)
0
 

Author Comment

by:tims
ID: 6953938
Perfect.  Thanks.
0
 
LVL 16

Expert Comment

by:heyhey_
ID: 6953967
> 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.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
diffSum example 4 50
eclipse apache tomcat admin console 52 121
What's wrong with this code? 4 26
java example issue 3 20
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question