Omnisoft Sweden

Java Servlets

Java servlets, one of the buzz words in the internet community today, is the server side equivalent of an applet - a small program that can execute on the server.

Originally as a part of the Java Web Server, JavaSoft developed support for other servers via the Servlet Development Kit, and today there is servlet support for most commercial servers (e.g. Netscape Fasttrack, Microsoft IIS, Apache, and many others).

Servlets are ideal for tasks requiring some intelligence or security check from the server, for dynamically creating html pages, or as a customized middleware to e.g. corporate databases. Running within an Java Virtual Machine on the server, a servlet has all of the language security that java offers. Faulty code will not crash the server, but merely write an exception message to the log, making it far more easy to debug the system. It also  exposes the system less to hacking, than traditional cgi-scripts or c-programs. Servlets can be "chained", i.e. the output from one servlet can be directed to another, making it simple to build flexible and reusable components for e.g. generating different layouts or languages. Several servers today also allow servlet access via https making it possible to write custom servlets for secure applications/transactions.

Servlets are also more performance effective than scripts or c-programs, a request to a new servlet merely starts a new thread in stead of spawning a new process, meaning much less overhead. Successive requests to the same servlet may be handled in the same thread, e.g. in a database application, making the server load very lightweight and quick.

You'll find an interesting article about Java Servlets in the October issue of WebReview.

JavaSoft's site has a lot of servlet documentation for the developer, a good starter is the Java Servlet API.

Java Info
Java Introduction
Java Tools
Java Graphics UI
Java Security
Java Performance
Java Servlets
Java Beans
Java Connectivity
Java & Business
Company Info
Company Profile
Contact Us