|
Resin provides a standalone web server. In our benchmarks, it actually serves static pages faster than Apache! The standalone web server is ideal for evaluation or experimentation and is a good choice as the web server for many sites.
To start the Resin web server, type:
Resin will print every port its listening to. In the above example, Resin is listening to port 8080 using HTTP and 6802 using its servlet runner protocol. (The servlet runner protocol only matters if you're using Resin with another web server, like Apache.) The following snippet shows the and configuration for the above example.
Go to the demos and make sure they work. Now, add a file resin1.2/doc/test.jsp containing the following:
A better way to run the servlet engine in a production environment is to use the start and stop scripts. These run Resin as a unix daemon and add extra reliability to the server. If Resin should ever exit, it will automatically be restarted. When developing, however, running Resin in the foreground is often more convenient. To start the web server, use
To stop it, use
wrapper.plResin uses a perl script, resin1.2/bin/wrapper.pl, to control the Java process. (bin/httpd.sh is a tiny shell script that calls wrapper.pl.) You can modify bin/httpd.sh or bin/wrapper.pl for your configuration.wrapper.pl automatically restarts Resin when it determines the Java process has died. If you need to stop Resin with , you'll need to kill the wrapper.pl process to make sure it doesn't restart Resin. ("httpd.sh stop" works by killing the wrapper.pl process.) Starting as a userMany configurations launch Resin from the init as another user. Here's an example:
On some Unixes, the ./configure; make process will build a bin/resin executable. You can use that executable to launch Resin, just like using httpd.sh:
The bin/resin executable will let you run Resin standalone as another user than root. To use the user-name and group-name directives, you must use bin/resin.
The Resin Web Server can be installed as an NT service. To install the service, use
To remove the service, use
You will either need to reboot the machine or start the service from the Control Panel/Services panel to start the server. On a machine reboot, NT will automatically start the web server. Resin's -install saves the command-line arguments and starts the service with those arguments. You can look at them in the control panel, under the executable string.
You can use the flag to see the arguments the startup scripts/executables pass to the JDK. The main Java executable is and starting Resin looks like the following, once you've properly configured the classpath:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||