As one of the commenters figured out, I made a fatal error in not running Tomcat as a standalone server, which had a horrible impact on its performance. After fixing this, the performance results between PHP and JSP are very near, probably within measurement error.
So I'm retracting this too-hastily written post and apologize for any grief it caused to Java users :)
It is the year 2011 and the "Java is slow" notoriety still isn't dead - and rightly so. In choosing the technology for a project I vas sort of leaning to use Java (or is everything which combines Java and the Web automatically called J2EE?) instead of PHP which I normally do (for better or for worse). I was expecting Java to be more optimized and together with JIT compiling, the faster solution. But I tend not to assume and do my own benchmarks so imagine my surprise...
The hardware: my small laptop, dual-core AMD Athlon 2 Neo, Ubuntu 11.04 x86.
The Java side: Tomcat 7.0.11 (bundled with NetBeans 7), sun-jre6, a simple Hello, World JSP page which sets and writes out a property of a (session-bound) bean, i.e. several lines of template HTML code with jsp:useBean, jsp:setProperty and jsp:getProperty directives in the middle.
The PHP side: apache 2.2-worker-mpm, PHP 5.3, php-xcode accelerator, PHP as FastCGI with fcgid; a simple Hello World PHP page which sets and writes out a session variable, i.e. several lines of template HTML code with a couple of lines of PHP in the middle, starting a session, setting a variable and writing it out.
The benchmark: Apache's ab with concurrency of 2 and 500 total requests. Note that this benchmark will start a new session for each HTTP operation in both cases.
The results: slightly over 900 requests/s with PHP and 62 requests/s with JSP.
It turns out that the JSP performance is the same even with a pure HTML page without any JSP invocations. Enterprisey indeed.
This is a so outrageous result that I'd really want to hear from regular J2EE developers on similar performance comparisons!