Try using multi-threading.
Look at the java.lang.Thread class which allows you to create and destroy
threads to run 'simultaneously'
Regards
Ben Cuttriss
(Embedded
image moved [EMAIL PROTECTED]
to file: 16/07/99 06:45
pic28940.pcx)
Please respond to [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
cc:
Subject: Multiple processes
Hi,
Could someone help me please?
I have a Servlet which builds a form with has 4 checkboxes. A user may
select 1-4 checkboxes. For each of the selected checkboxes, the servlet
should run a perl script. How should I write my servlet such that I will be
able to run 4 perl scripts simulataneously if a user selects all 4
checkboxes?
Many thanks in advance.
cheers.
Tania
********Pseudocode**************
public class ExampleServlet extends HttpServlet
{
public void doPost(HttpServletResponse response, HttpServletRequest
request)
{
// CBone, CBtwo, CBthree and CBfour are the four CheckBoxes.
String CBone = request.getParameter("CBone");
String CBtwo = request.getParameter("CBtwo");
String CBthree = request.getParameter("CBthree");
String CBfour = request.getParameter("CBfour");
// pseudocode
for all the checkboxes which are not null, run a corresponding
Perl script.
// QUESTION: how do I run 4 processes at teh same time?
}
}
___________________________________________________________________________
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
pic28940.pcx