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
- No Subject George I Matkovits
- No Subject Adele Stemmet
- No Subject prateek dalvi
- No Subject Shivashankar Krishnan
- No Subject Jennifer Feeney
- No Subject Geeta Ramani
- No Subject Shane Duan
- No Subject Jennifer Feeney
- No Subject Jennifer Feeney
- No Subject Ravindra Kakani
- No Subject Huimin Wang
- No Subject Suresh Jeevarathnam
- No Subject Ramesh, Kesav
- No Subject Neeta Patil
- No Subject ravi
- No Subject Syed Mohammad Ikram Uddin
- No Subject subha ghosh
- No Subject faisal
- No Subject Arslan Basharat
- No Subject R.Gurumoorthy
- No Subject subha ghosh
