Hmm. Although I'm a great fan of servlets, the jury is still out on whether they will take off properly, or just languish as some people's favourite web-programming system.
On the plus side, servlets are very flexible and have easy access to the full set of Java APIs, including any you may find in jar files. This includes easy socket and database access, powerful email and directory services and so on. If you know Java, writing servlets can be efficient and rewarding. Servlets are generally much faster than CGI scripts, and make it much simpler to maintain data between HTTP requests.
On the minus side, there are still hardly any publicly available (reasonable cost) web hosting companies who support servlets. I would love to get some of my servlets up and running on the real web, but at the moment I'm limited to my home and work intranets. Another problem is the lack of knowledge of servlets by the general web-programming population. How many people do you know who have heard of CGI, ASP, ColdFusion and so on, but have no idea about servlets. Even in the Java community they are not particularly well known. Sun also screwed up by not releasing the servlet API as part of Java 2, even though they claimed it would be included. Well-written server-specific compiled code (Apache modules, NSAPI etc.) can be faster than servlets, although more machine-specific.
The servlet API is currently up to version 2.1, and is available for download from Sun. As Paul notes, there are plenty of servlet engines available (one list is at
servlets.com, there's another at Sun) if you want to use servlets on a machine that you control. I mainly use Apache Jserv.
There is some discussion as to whether the servlet API really gives web developers what they want. It is essentially similar in concept to CGI - a simple wrapper round the HTTP protocol), but with persistent context and an attempt at persistent session information. Many authors have added extra layers on top of servlets such as efficient HTML templates (I like
Webmacro) and automatic database-to-web translation.
There is some reason to claim that a well-written servlet-based application can be more maintainable than an equivalent in other systems, but introductory books on servlet programming (like most introductory books on any sort of programming) don't address maintainability, and imply that servlets should be monolithic lumps of sequential code. I strongly suggest that any web application is designed, coded and
unit tested first, and only then is the servlet layer added and tested. If you start by coding the servlets, it can really skew the design.
I hope this helped. Any more questions?