Many would think at this point I am talking about better AJAX support in the core. While we do need better support for AJAX and I am not talking about DWR, I don't think that's what ails Java in its quest for being . At the end we will look at two ways in which we can overcome this problem.

Java is taking a beating in better mass adoption against PHP simply because it is harder to setup in web hosting environment. PHP and even Ruby is available as an Apache module which is very trivial to setup and use. JSP / Servlets on the other hand is much harder to integrate with Apache.

Why Apache is the the key to Web 2.0 adoption?
Apache is the most popular web server, known for its stability and ease of use. It is cross platform. Most Web 2.0 companies and products rely on Apache as their web server and for right reasons.

What are the problems of Java in Apache Integration?
Complexity in short. Tomcat is probably the most popular JSP, Servlet container for most organizations. Tomcat is free (which aids its popularity) and developed under the Apache organization. I would have expected both these products to be tightly integrated. In reality it is a nightmare from hell to even begin. I wouldn't say there aren't any documents. There are few confusing ones which leads to more questions than answers. What we lack is a clear simple guideline to integrate the two.

Solutions
Previouly I had described a much simpler way to integrate Tomcat 5.5 with Apache 2.x, in just 5 steps.

However we need to move further. We need to make Java Servlet container as easily integratable as php or ruby . Running a separate Tomcat instance may not be an acceptable solution to many web hosting providers. We need to be able to run Tomcat within Apache itself, use its threads. In the distant past there was another Apache project JServ which did that. Later it was discontinued in favor of Tomcat. Tomcat is powerful but most small developers do not need its full gamut of capabilities. Most of them would be happy with a smaller subset which is available everywhere, even on one dollar hosting.

And finally Sun and java community needs to approach web hosting providers and make the language ubiquitous in every hosting platform, big or small. Apachefriends has done an admirable job with XAMPP for LAMP community and has made Tomcat 5.5 available with its simplified LAMP installation. Now if only we could package Java with all Linux and BSD installations by default…