Why not construct a class using the "singleton class" design pattern
and have the class launch a thread that checks the file status every
20 seconds?  This "singleton class" would have a public, static
method, "checkStatus()", that would return the file status.

---- Original Message ----
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: RE: JSP and Threads
Date: Fri, 3 May 2002 14:44:10 +0200

>Hi All
>
>i'd like to write application where I need to share one Thread
>between multiple .jsp pages
>
>eg.
>I'll create thread where i would check some file status once in 20sec
>and svae status to private string variable
>
>and i'd have a public .checkStatus() method which will return this
>status string
>
>now i have some (2 or more) .jsp pages and in all i need to call
>that's thread.checkStatus() method and write it to output
>
>
>can someone help me??/
>
>[woodu]
>

===========================================================================
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://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to