2.6 Configuring Caucho Resin

To run Resin on your desktop, you should first download the Resin zip file from http://caucho.com/products/resin/ and unzip it into a location of your choosing (hereafter referred to as install_dir ). Once you have done so, configuring the server involves two simple steps.

  1. Setting the JAVA_HOME variable. Set this variable to list the base SDK installation directory.

  2. Specifying the port. Edit install_dir /conf/resin.conf and change the value of the port attribute of the http element from 8080 to 80.

Details are given in the following subsections.

Setting the JAVA_HOME Variable

The most important setting is the JAVA_HOME environment variable. This variable should refer to the base SDK installation directory. Details are given in Section 2.4 (Configuring Apache Tomcat), but for a quick example, if you are using Java 1.4.1 on Windows, you might put the following line in C:\autoexec.bat .

 
 set JAVA_HOME=C:\j2sdk1.4.1_01 

Specifying the Resin Port

To avoid conflicts with preexisting servers, Resin uses port 8080 by default. However, if you won't be simultaneously running another server, you will probably find it convenient to change Resin to use port 80, the standard HTTP port. To do this, edit install_dir / conf/resin.conf and change <http port='8080' /> to <http port='80' /> .

Testing the Basic Server Setup

To verify that you have configured Resin successfully, double-click on install_dir /bin/httpd.exe . Open a browser and enter http://localhost/ ( http://localhost:8080/ if you chose not to change the port to 80). You should see something similar to Figure 2-9. Shut down the server by selecting Stop in the small dialog box that pops up when you start the server.

Figure 2-9. Resin home page.

graphics/02fig09.jpg

After you customize your development environment (see Section 2.7), be sure to perform the more exhaustive tests listed in Section 2.8.



Core Servlets and JavaServer Pages (Vol. 1.Core Technologies)
Core Servlets and Javaserver Pages: Core Technologies, Vol. 1 (2nd Edition)
ISBN: 0130092290
EAN: 2147483647
Year: 2002
Pages: 194

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net