Chapter 12: Tomcat and IIS 3. Modify the
Chapter 12: Tomcat and IIS 3. Modify the workers.propertiesfile. The workers.propertiesfile will have to be changed so that the host name (or IP address) of the Tomcat worker is the application server, as shown here: worker.myworker.host=myappserver All other entries remain the same. Note that the application server, myappserverin this example, must be IP addressable, from the Web server. This example of a distributed configuration of a server running IIS and another server running a single instance of Tomcat is a good demonstration of the client server concepts that form the foundation of the AJP 1.3 protocol. Multiple Tomcat Workers As shown earlier in the chapter, supporting multiple Tomcat workers requires the following steps: 1. Configure the AJP Connectors for the workers in Tomcat s server.xmlfile. 2. Add multiple workers to the workers property file as a comma-separated list, as shown: worker.list = my-tomcat-worker1, my-tomcat-worker2 worker.my-tomcat-worker1.type = ajp13 worker.my-tomcat-worker1.host = host1 worker.my-tomcat-worker1.port = 8009 worker.my-tomcat-worker2.type = ajp13 worker.my-tomcat-worker2.host = host2 worker.my-tomcat-worker2.port = 8009 The Tomcat workers can be running on separate hosts, as shown in the preceding code, or even on the same host. See Chapter 15 for information on how to run multiple Tomcat instances on the same host. Load-Balanced AJP Workers In addition to the AJP worker, a load-balanced worker consisting of multiple ajp13workers can be defined. Chapter 11 describes the details for setting up a load-balanced environment. The concepts discussed in Chapter 11 are specified for Apache and Tomcat, but are applicable regardless of the Web server used. More advanced load balancing configurations are covered in Chapter 17 . Summary This chapter presented details about using IIS as a Web front end to Tomcat. To conclude this chapter, let s review some of the key points discussed. The main focus of the chapter was configuring IIS to work as a Web front end to Tomcat using the ISAPI. As you saw, this works in the following way: . IIS is configured with the ISAPI plug-in, which works both as an ISAPI filter as well as a Web application extension. . The plug-in intercepts all requests to the IIS Web application, and then uses the URI-toTomcat- worker mappings defined in the uriworkermap file to decide which request to forward
For reliable and cheap web hosting services please check javaweb hosting website.