What you need
- Windows 2003 Server; WIndows 2008 R2 (64 or 32 bit); Windows XP Professional
- Apache 2.2
- Java 1.5 or later
- a Mac with WebObjects 5.3 or 5.4 installed
Install Java and Apache
- Download and install Java J2SE 5.0
You must install the multilingual option.
- Download and install apache 2.2
You cannot have any spaces in the installation path otherwise mod_webobjects won't work properly.
Copy WebObjects files from your Mac
In this description WebObjects will be installed on drive C: and apache is located under c:/apache.
Create the following directory tree under Windows
Copy the listed Frameworks from /System/Library/Frameworks to C:/Apple/Frameworks:
On MacOSX Frameworks are "versioned" using the symbolic link trick, this doesn't work on Windows.
Once copied, check each framework to make sure that the "Resources" and "WebServerResources" folders are in the ".framework" directory and not in a subdirectory (usually "Verisions\A\")
Copy JavaMonitor.woa and wotaskd.woa from /System/Library/WebObjects/JavaApplications to c:/Apple/Library/JavaApplications
Copy the content of /System/Library/WebObjects/WODocumentRoot to your apache document root directory. If you don't use D2W or D2JC I think you can omit the both Java folders.
If you are installing WebObjects 5.3 copy /System/Library/PrivateFrameworks/ to C:/Apple/Library
At least copy the jar files from /Library/WebObjects/Extensions to c:/Apple/Local/Library/WebObjects/Extensions.
Add environment variable
Under "System" add the environment variable NEXT_ROOT = C:/Apple
Installing the Apache Adaptor
Copy the mod_WebObjects.so file to c:/apache/modules
In some cases apache won't launch on a Windows Server system with this module.
In this case you should install the .Net Framework (3.x) on your system.
Open the httpd.conf file in c:/apache/conf and search for the line "LoadModule rewrite_module modules/mod_rewrite.so" and put the following line right befor that:
At the end of the httpd.conf file add the following lines:
Find the <Directory /> entry and comment out the last two lines
Create the file httpd-webobjects.conf in your c:/apache/conf/extra folder:
You had to restart your Apache Service to apply your changes.
Installing WOTaskDaemon as a Windows Service
Using Microsoft Windows 2003 resource kit
Microsoft provides free tools to register applications as services : instsrv and srvany.
Both are bundled with "Microsoft Windows 2003 resource kit" which can be downloaded here.
Below a quick translation of the KB469536 which describes their usage:
First create a new service using instsrv that refers to the srvany executable
Then fire regedit and navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WOTaskD
Add a sub-key named "Parameters".
In this sub-key add a new REG_SZ key named "Application" and put the path of the WOTaskD.cmd file.
Your reg key should now look like below :
To try your newly created service simply start it by typing :
You should be aware that srvany is just a laucher, this means that the "service" has no control over WOTaskD's sub-processes:
stopping the service has no effect on WOTaskD. For now the only solution I found is to use the following lines in a cmd file :
You can use FireDaemon and add a new Service:
To test the system you can also install WO Monitor as a service:
Testing the installation
Now that everything should be set up properly, it is time for a small test. First, let's look if wotaskd is working.
Open a browser and go to http://<myhost>:1085If it works, you should see the host's configuration displayed in the browser. Now, start WOMonitor (double click on ...\JavaMonitor.woa\JavaMonitor.CMD) if it is not already running as a service.
Wait a few seconds, then point the browser to http://<myhost>:56789
You should see Monitor's main window. Now you can start deploying your applications.
The requested URL [WO:...] was not found
By default as configured in the httpd-webobjects.conf file the alias for the adaptor is "/Apps/WebObjects".
You can change this and restore the "/cgi-bin/WebObjects" path by changing this variable.
If you wish to keep the default value (or use a custom value) do not forget to change the adaptor path in the "Site" tab of JavaMonitor