• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tomcat only serves one page at the same time

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 1514
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Robert Jaeger
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Why is the word "abbreviation" so long? And this ad is so short?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic