Version 62.1 by smmccraw on 2007/07/08 10:29

Hide last authors
smmccraw 62.1 1 If you are accessing your application with URLs that look like http:~/~/localhost:45437/cgi-bin/WebObjects/AppName.woa/ (with the xxx:portnum instead of xxxx/-portnum) ... then you are using the [[Evil Direct Connect>>Programming__WebObjects-Web Applications-Development-Direct Connect]]. See that page for why you don't want to be using Direct Connect. See this page for how to stop.
Kieran Kelleher 22.1 2
smmccraw 62.1 3 == Turn on Apache ==
Kieran Kelleher 22.1 4
smmccraw 62.1 5 Go to **System Preferences -> Sharing -> Services** and turn on **Personal Web Sharing** if it is not already on.
Kieran Kelleher 28.1 6
smmccraw 62.1 7 == Edit Apache Config ==
Kieran Kelleher 22.1 8
smmccraw 62.1 9 Note: **Do NOT try to use the Bonjour / Rendezvous name of your machine in this step.** It will cause you grief. Accept this and don't even try. You have been warned.
Kieran Kelleher 22.1 10
Kieran Kelleher 60.1 11 Edit **/etc/httpd/httpd.conf**, find the line containing **ServerName** and change it to this:
Pascal Robert 56.1 12
Kieran Kelleher 22.1 13 {{code}}
14
15 ServerName localhost
16
17 {{/code}}
18
Kieran Kelleher 60.1 19 That line may be commented out by default. You can simply uncomment it (remove the leading pound sign) and then restart apache:
Kieran Kelleher 22.1 20
21 {{code}}
22
23 sudo apachectl restart
24
25 {{/code}}
26
smmccraw 62.1 27 == Tell wotaskd to Use Localhost Too ==
Pascal Robert 56.1 28
Kieran Kelleher 22.1 29 Edit **/System/Library/WebObjects/JavaApplications/wotaskd.woa/Contents/Resources/Properties**
30
31 Add this line after the **WOPort=1085** one:
32
33 {{code}}
34
35 WOHost=localhost
36
37 {{/code}}
38
39 Now you need to restart wotaskd:
40
41 {{code}}
42
Pascal Robert 31.1 43 sudo systemstarter stop "WebObjects Services"
44 sudo systemstarter start "WebObjects Services"
Ray Kiddy 30.1 45
46 {{/code}}
47
David Holt 32.1 48 or
Ray Kiddy 30.1 49
David Holt 32.1 50 restart wotaskd and womonitor with launchctl if your WebObjects install launches that way.
Ray Kiddy 30.1 51
smmccraw 62.1 52 == Finally, Configure your Application ==
Pascal Robert 24.1 53
54 Add or edit these launch parameters:
55
Kieran Kelleher 22.1 56 {{code}}
57
Pascal Robert 24.1 58 -WODirectConnectEnabled false
59 -WOHost localhost
60 -WOAdaptorURL http://localhost/cgi-bin/WebObjects
61 -WOPort 5555
Kieran Kelleher 22.1 62
63 {{/code}}
64
Pascal Robert 24.1 65 The WOPort is optional, but useful if you want consistent URLs for bookmarks and such. You can use any number you want, but it needs to be unique for each application you launch (or rather, you can only run one app instance on a given WOPort at a time). In WOLips, WOPort, WODirectConnectEnabled, and WOAdaptorURL already exist and just need to be updated. WOHost does not, and needs to be added. The dash in front of the name ("-WOHost") is important and must be in the name for the setting to work properly.
Kieran Kelleher 22.1 66
David Holt 32.1 67 You may want to set this in your global WOLips settings so you don't have to set it every time you make a new launch configuration. You will need to go back and modify existing launch configurations with these settings even if you set it globally. Global settings only apply to newly created launch configurations.