Hi! I have configured succesfully a WinNT/Apache1.3/Tomcat4/MySQL/Cocoon architecture. Well, there�s only one problem. When I try to request a *.jsp from 2 browsers at the same time, Tomcat doesn�t return results (loads forever). I think that happens only during the first request, when Tomcat generates the servlets. However, I am not sure and worried about Tomcat�s performance. Is this just a problem at the first request when I try to access the same jsp? Is there a software that checks and reports server performance (e.g. by sending a lot of random requests)? Maybe someone has an idea, Robito.
Why don't you verify that it happens the first time the JSP is accessed. This si normal because that's the time when the servletis being generated. On subsequent requests it should not take longer, regardless of how many requests are coming in, unless you have synchronized some of your code, or implemented the "SingleThreadModel" interface.
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Joined: Apr 29, 2002
If it works fine after the first servlet-generation until the next jsp-changes then it�s ok for me. I just wondered about the problems with the first request. Thanks, Robert.
Depnding on the speed of your server, the first hit on a JSP can take an incredibly long time as it has to compile the JSP into a servlet (usually) and then compile the servlet into Java bytecodes, plus run the init code for the servlet. For this reason a lot of people prefer to precompile their JSPs. The exact method for doing that depends on your appserver, so you'll have to RTFM. For testing purposes, I just live with the rotten performance, though, since a precompiled JSP is worthless once I've updated the page.
Customer surveys are for companies who didn't pay proper attention to begin with.