Hi, I started a thread to do something in my servlet by the following method, I don't know if it is what you need. Good luck, Huimin Wang ========================================================= class YourServlet extends ..... { void foo() { Runnable cmd = new Sample(this); new Thread(cmd).start(); } void notify() {......} } class Sample implements Runnable { YourServlet observer; Sample(YourServlet observer) { this.observer = observer; } public void run() { //do what you want to do in a thread ! ...... //tell your servlet something! observer.notify(); ...... } } ========================================================= Ravindra Kakani wrote: > Hi All, > > Can anyone give me a sample code that deals with starting a new thread in a > servlet and then destroying the thread. > your help is appreciated. > > Regards, > > Ravindra Kakani > > ___________________________________________________________________________ > 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 ___________________________________________________________________________ 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