> Maybe you should paste your "simple HttpServlet" code ?
No Problem. Note, there is a "service"-methode in this sample-code. It is just for debugging and testing. There is no difference between behavior with or without this "service"-methode.
Okay, here is my simple HttpServlet (it is really simple, isn´t it :-) ):
import java.io.*;
import java.net.*;
import java.util.Date;
import javax.servlet.*;
import javax.servlet.http.*;
public class ThreadingTest extends HttpServlet {
protected void processRequest(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
out.println("<html>");
out.println("<head>");
out.println("<title>Servlet ThreadingTest</title>");
out.println("</head>");
out.println("<body>");
out.println("<h1>Start</h1>");
out.flush();
try {
Thread.sleep(5000);
} catch (InterruptedException ex) {}
out.println("<h1>Ready</h1>");
out.println("</body>");
out.println("</html>");
out.close();
}
protected void doGet(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException {
processRequest(request, response);
}
protected void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
public String getServletInfo() {
return "Short description";
}
public void service(ServletRequest req, ServletResponse res) throws
ServletException, IOException {
System.out.println(System.currentTimeMillis() +"ThreadingTest
invoke service... " + Thread.currentThread().toString());
super.service(req,res);
System.out.println(System.currentTimeMillis() +"ThreadingTest
service ready... " + Thread.currentThread().toString());
} }
smime.p7s
Description: S/MIME Cryptographic Signature
