Applets are just one half of any client server system. Java also has Servlets which are useful in dynamically extending the functionality of web browser. With Servlets, Java spanned on the both sides of client server system.
Servlets can be used to dynamically generate web content. The information stored in database tables can be retrieved and shown as a web page on a browser. Typically, this involves reading the database tables using JDBC and converting them into formatted HTML and sending it to the browser for display. For example, depending upon the user search request, the matching items from the catalog are shown along with the prices and their availability. Most of the web page is constructed dynamically and has details for a specific user search request.
Servlets like all Java programs are portable and can run on any server that supports JVM and has a servlet container. e.g., They can run on IBM Websphere, Tomcat or Web Logic.