Apache Tomcat ISAPI Redirector and Canto Cumulus WPP Chad Gray Carey Color Inc. http://www.careyweb.com/ 9/1/2007 ver 1.0.0 WHY? If you want to run JSP, HTML and.net applications all on one web site you need to get JSP pages to process under IIS. Install Cumulus WPP First you need to install Cumulus WPP Standalone. This will install a copy of Apache Tomcat 5.5.17 here: C:\Program Files\Canto\Cumulus 7 Web Publisher Pro\apache tomcat 5.5.17 Use the register.bat file in the folder: C:\Program Files\Canto\Cumulus 7 Web Publisher Pro\apache tomcat 5.5.17\bin To install Tomcat as a service. Now that we have a working Tomcat server we need to configure it to run multiple web sites by editing the server.xml file and adding host nodes to it. Define appbase as the place where you will be putting the Cumulus application or war file. C:\Program Files\Canto\Cumulus 7 Web Publisher Pro\apache tomcat 5.5.17\conf\server.xml <Host name="10.1.0.40" appbase="e:\www\testwebsite\html" unpackwars="true" autodeploy="true" xmlvalidation="false" xmlnamespaceaware="false"> </Host> <Host name="10.1.0.41" appbase="e:\www\testwebsite2\html" unpackwars="true" autodeploy="true" xmlvalidation="false" xmlnamespaceaware="false"> </Host> Restart the service and test each web site using port 8080: http://10.1.0.41:8080/cumulus Setup the Tomcat ISAPI connector Download the Tomcat Connector (JK 1.2 Binary Releases) http://tomcat.apache.org/download connectors.cgi Win32 > jk 1.2.25 > isapi_redirect.dll
Place the isapi_redirect.dll file in this location: C:\Program Files\Apache Software Foundation\Jakarta ISAPI Redirector\bin There are three main config files needed to make the ISAPI filter work: isapi_redirect.properties is a text file that contains the configuration for the ISAPI redirector dll. It MUST be in the same folder as the isapi_redirect.dll file. C:\Program Files\Apache Software Foundation\Jakarta ISAPI Redirector\bin\isapi_redirect.properties # Configuration file for the Jakarta ISAPI Redirector # The path to the ISAPI Redirector Extension, relative to the website # This must be in a virtual directory with execute privileges extension_uri=/jakarta/isapi_redirect.dll # Full path to the log file for the ISAPI Redirector log_file=c:\program Files\Apache Software Foundation\Jakarta ISAPI Redirector\log\isapi_redirect.log # Log level (debug, info, warn, error or trace) log_level=info # Full path to the workers.properties file worker_file=c:\program Files\Canto\Cumulus 7 Web Publisher Pro\apachetomcat 5.5.17\conf\workers.properties # Full path to the uriworkermap.properties file worker_mount_file=c:\program Files\Canto\Cumulus 7 Web Publisher Pro\apache tomcat 5.5.17\conf\uriworkermap.properties workers.properties is a text file where you define the workers. You only need one worker unless you want to start getting into load balancing, but that is a whole other topic. C:\Program Files\Canto\Cumulus 7 Web Publisher Pro\apache tomcat 5.5.17\conf\workers.properties # This file provides minimal jk configuration properties needed to # connect to Tomcat. # # The workers that jk should create and work with worker.list=worker1 # set properties for worker1 (ajp13) worker.worker1.type=ajp13 worker.worker1.host=10.1.0.40 worker.worker1.port=8009 uriworkermap.properties Is a text file where you link your workers to the items you want them to work on. We add /Cumulus* because our Cumulus web app will reside at
http://10.1.0.40/cumulus and http://10.1.0.41/cumulus_z if you use the 3.0 style web app. C:\Program Files\Canto\Cumulus 7 Web Publisher Pro\apache tomcat 5.5.17\conf\uriworkermap.properties # uriworkermap.properties IIS # # This file provides sample mappings for example worker1 2 3 # worker defined in workers.properties # The general syntax for this file is: # [URL]=[Worker name] *.jsp=worker1 *.jspx=worker1 /*.jsp=worker1 /*.jspx=worker1 /Cumulus*=worker1 Installing the Tomcat ISAPI connector in IIS Right click on the Web Sites folder in IIS go to properties and check the Run WWW Service in IIS 5.0 isolation mode under the Service tab.
While in the web site properties section, go to the ISAPI Filters tab. We need to add the dll as an ISAPI filter. Name it Tomcat Connector and browse to the dll at this path: C:\Program Files\Apache Software Foundation\Jakarta ISAPI Redirector\bin\isapi_redirect.dll Installing the ISAPI filter at this level will make the ISAPI filter available to all future web sites that are created. If you don t want this effect then install the ISAPI filter on each web site as needed.
Now you need to make a virtual directory for each website in IIS named jakarta (as defined in the extenstion_uri setting of the isapi_redirect.properties file) pointing to the ISAPI folder: C:\Program Files\Apache Software Foundation\Jakarta ISAPI Redirector\bin Make sure that there are permissions to run scripts on the folder. Now you need to add a new Web Service Extension in IIS to allow the dll to run. Name it something like Jakarta Tomcat and hook it up to the following path: C:\Program Files\Apache Software Foundation\Jakarta ISAPI Redirector\bin Make sure the status is "allowed".
In IIS you point the web site root to: E:\www\testwebsite\html\ROOT Place the Cumulus.war file in: E:\www\testwebsite\html Place all other HTML/ASP/JSP etc. in: E:\www\testwebsite\html\ROOT Give the server a re boot and you should be able to process jsp pages without port 8080. http://10.1.0.40/cumulus If not go back over these instructions very carefully. One little thing off and it will not work right. Closing Comments The only problem I have right now is if you hit http://10.1.0.41/ then index.jsp does not automatically run. You have to enter this URL: http://10.1.0.41/index.jsp One work around I use is to place a index.htm files with a meta tag refresh to send them to the index.jsp file. Also Canto has release a new version 7.5.1 and when you install the standalone server it installs a new version of Tomcat 5.5.23 so make sure the configuration files are pointing to the correct folder I.E. C:\Program Files\Canto\Cumulus 7 Web Publisher Pro\apache tomcat 5.5.23\conf When you hit a web site and you happened to get asked for a login and password when you should not. Make sure the security permissions on the isapi_redirect.dll file are setup correct. It needs to have Administrators, Power Users, SYSTEM and Users. I noticed sometimes when I downloaded the dll these got messed up. After a lot of these changes you will want to restart IIS or the Tomcat service for the changes to take effect. A reboot every once and while is a good idea also.