| Caucho Servlet Engine on O'Reilly WebSite Pro|
Resin provides a fast servlet runner for
O'Reilly WebSite Pro,
allowing it to run servlets and JSP files.
To configure Resin with O'Reilly WebSite Pro, you must follow the following steps:
- Configure WebSite Pro via its property sheet
- Configure resin.conf with a text editor
- Start httpd. You may want to run httpd as an NT service.
|Configuring Resin and WebSite Pro|
You should use resin1.x/bin/setup.exe to setup your configuration.
If you use setup.exe, you can just skip to the next section.
If you don't use the supplied setup.exe program, here are the steps needed to
setup WebSite Pro to run Resin:
- Make sure Resin works via it's httpd.exe!
- Stop WebSite Pro.
- Copy isapi_srun.dll to the WebSite root directory, .
- Using the WebSite property sheet, Mapping tab, Associations list, associate .jsp,
.xml and .xtp with the above extension .
- Using the WebSite property sheet, Mapping tab, Content types list, set the content
type for .jsp, .xml, and .xtp to .
- Add isapi_srun.dll to WebSite's API pre-load list. Use the registry editor and add
the full pathname of isapi_srun.dll, typically , to the
LoadLibrary string. This is located under
HKEY_LOCAL_MACHINE\Software\Denny\WebServer\CurrentVersion. The variable name is
LoadLibrary, and it is a semicolon-delimited string. Simply add
to the end of the LoadLibrary string.
Resin Virtual Server
In order to browse the supplied documents and samples, we strongly recommend
creating a virtual server and mapping its root to the Resin directory. When creating
this virtual server with WebSite's New Identity Wizard, you can uncheck both CGI options in the
New Identity Wizard. Then after it's finished, change the / mapping from to
. To set the virtual server up:
- On WebSite's property sheet, Identity Tab, click New... and step through the New
Identity Wizard. For this example, we'll assume that you used as the URL prefix.
- Create the following document mappings using the property sheet, Mapping tab, Document list.
We'll assume the identity hostname is resin.foo.com and the URL prefix is .
- Map to the Resin subdirectory
- Map to
- Map to
- Map to
Make sure WebSite Pro is running, then:
- Browse http://resin.foo.com/servlet/Hello and /foo.jsp.
You should see a "cannot connect" error.
- Start httpd.exe
- Browse http://resin.foo.com//servlet/Hello and /foo.jsp.
You should now see the servlet.
resin.conf should mirror the configuration of WebSite Pro. In other words, you
need to configure the document root and any directory aliases.
For many users, you only need to change the path-mapping attributes.
attribute from 'doc' to something like 'c:\website\htdocs'. For more
complicated configurations, you'll need to add
Testing the servlet engine
From the Resin bin folder, you need to start httpd.exe to start the
Now browse http://localhost/test.jsp. You should get a 'file not
Create a test file 'C:\WebSite\htdocs\test.jsp'
2 + 2 = <%= 2 + 2 %>
Browse http://localhost/test.jsp again. You should now get
As a final test, change language to 'java' and refresh the page.
Nothing should change.
- First, check your configuration with the standalone httpd.sh.
- Check . That will tell if
the ISAPI extension is properly installed.
- Each srun host should be green and the mappings should
match your resin.conf.
- If caucho-status fails entirely, the problem is in the
- Check that isapi_srun.dll is in
- If caucho-status shows the wrong mappings, there's something wrong
with the resin.conf.
- If caucho-status shows a red servlet runner, then httpd.exe hasn't
- If you get a "cannot connect to servlet engine", caucho-status
will show red, and httpd.exe hasn't started properly.
- If httpd.exe doesn't start properly, you should look at the logs
in resin1.x/log. You should start to get
- If you get Resin's file not found, the WebSite configuration
is good but the resin.conf probably points to the wrong directories.
The following configuration line arguments are recognized by httpd.exe and
httpd.exe. When installed as a service, these argument will be used when
the service starts.
|-verbose||Write more verbose information to the log file
|-resin_home <path>||Sets the location of Resin
|-java_home <path>||Specify the JDK location
|-msjava||Use Microsoft's JVM
|-nojit||Disable JIT compilation to help debugging
|-classpath <cp>||Add to the classpath
|-J<arg>||Set a Java command line argument, e.g. -J-nojit.
|-D<foo=bar>||Set a Java variable, e.g. -Dresin.home=here.
|-install||Install as an NT service
|-install-as <name>||Install as an NT service with the specific name.
|-remove||Remove as an NT service
|-remove-as <name>||Remove as an NT service with the specific name.
|Copyright © 1998-2002 Caucho Technology, Inc. All rights reserved.|
Resin® is a registered trademark,
and HardCoretm and Quercustm are trademarks of Caucho Technology, Inc.