Posted By:
Achilleus_Mantzios
Posted On:
Friday, March 22, 2002 03:23 AM
Just to add some more things.
My servlet
a) Dosnt implement SingleThreadModel
b) Dosnt synchronize over resources
c) Dosnt have service methods synchronized
Also in paragraphs 2.2.1 and 2.3.3.1 of the servlet
2.3 specs it is stated clearly that if none of
conditions a), c) hold then requests should be
served simultinously.
It is strange that after mail bombing
any servlet related list, i still have
no input at all, not even a sign that
somebody has read my message!
Please try with the following servlet.
/*****************************************************************/
import javax.servlet.*;
import javax.servlet.http.*;
public class ThreadTest extends HttpServlet {
public void init(ServletConfig config) throws ServletException {
super.init(config);
}
protected void processRequest(HttpServletRequest,HttpServletResponse
response)
throws ServletException, java.io.IOException {
response.setContentType("text/html");
System.out.println("In the begin damnit");
try {
Thread.sleep(10000);
}
catch (Exception e) {}
}
protected void doGet(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, java.io.IOException {
processRequest(request, response);
}
protected void doPost(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, java.io.IOException {
processRequest(request, response);
}
}