Wiki source code of WO 5.4 Getting Started

Version 34.1 by Pascal Robert on 2011/03/20 03:06

Hide last authors
David Holt 31.1 1 {{toc}}{{/toc}}
Gavin Eadie 23.1 2
David Holt 31.1 3 = Installing WebObjects and WOLips =
Timothy Worman 29.1 4
Pascal Robert 33.1 5 Download Xcode from ADC. Not useful for WebObjects deployment, but it will install tools like gcc and debugging tools that you might want useful.
Gavin Eadie 23.1 6
Pascal Robert 33.1 7 Install [[Golipse>>https://github.com/rebeld/Golipse]]. Golipse will fetch the needed version of Eclipse, WOLips and other tools for WebObjects development.
Gavin Eadie 23.1 8
Pascal Robert 33.1 9 Install the WebObjects frameworks according to [[those instructions>>WOL:Using WOLips With Multiple Versions of WebObjects]].
Gavin Eadie 23.1 10
David Holt 31.1 11 Start Eclipse and switch to the WOLips perspective. To achieve this, open the //Window// menu, select //Open Perspective// and select //Other...//.
Gavin Eadie 23.1 12
David Holt 31.1 13 [[image:PerpectiveMenu.png]]
Timothy Worman 29.1 14
David Holt 31.1 15 In the perspective choices, select //WOLips// and click //Ok//.
Gavin Eadie 23.1 16
David Holt 31.1 17 [[image:PerspectiveChoices.png]]
Gavin Eadie 23.1 18
David Holt 31.1 19 If you don't switch to the WOLips perspective, you won't be able to create new WebObjects projects.
Timothy Worman 29.1 20
David Holt 31.1 21 You are now ready to create projects or importing the examples. 
Timothy Worman 29.1 22
David Holt 31.1 23 {{id value="javamonitor"}}{{/id}}
24
Pascal Robert 33.1 25 = Running Monitor and wotaskd on Mac OS X =
David Holt 31.1 26
27 Monitor and wotaskd are installed, but the launchd scripts to start them are not installed. You can grab them from a 10.5 Server installation, or follow those instructions.
28
Gavin Eadie 23.1 29 Make sure //Web Sharing// is enabled in the //Sharing// panel in //System Preferences// (note: 10.5 comes with Apache 2.2 as the default).
30
31 Edit ///etc/apache2/httpd.conf// (if you did a fresh install, you may already have these - search httpd.conf first)
32
David Holt 31.1 33 Search for rewrite//module, and above it, add this line~://
Gavin Eadie 23.1 34
35 {{code}}
36
37 LoadModule WebObjects_module /System/Library/WebObjects/Adaptors/Apache2.2/mod_WebObjects.so
38
39 {{/code}}
40
41 Go to the very end and add:
42
43 {{code}}
44
45 Include /System/Library/WebObjects/Adaptors/Apache2.2/apache.conf
46
47 {{/code}}
48
49 Search for "Directory /" and comment out the Order and Deny lines:
50
51 {{code}}
52
53 <Directory />
54 Options FollowSymLinks
55 AllowOverride None
56 #Order deny,allow
57 #Deny from all
58 </Directory>
59
60 {{/code}}
61
62 Restart apache
63
64 {{code}}
65
66 sudo apachectl graceful
67
68 {{/code}}
69
David Holt 31.1 70 If you run //ps auxw grep httpd// you should see apache now running
Gavin Eadie 23.1 71
72 Create ///Library/LaunchDaemons/com.apple.webobjects.wotaskd.plist// with:
David Holt 31.1 73 (for OSX 10.5 make sure the permissions of this file are 644 system/wheel/everyone otherwise launchctl will throw a "dubious permissions" error when you try to load the plist with the commands that follow)
Gavin Eadie 23.1 74
75 {{code}}
76
77 <?xml version="1.0" encoding="UTF-8"?>
78 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
79 <plist version="1.0">
80 <dict>
81 <key>Disabled</key>
82 <false/>
83 <key>GroupName</key>
84 <string>appserverusr</string>
85 <key>Label</key>
86 <string>com.apple.webobjects.wotaskd</string>
87 <key>OnDemand</key>
88 <false/>
89 <key>Program</key>
90 <string>/System/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd</string>
91 <key>ProgramArguments</key>
92 <array>
93 <string>wotaskd</string>
94 <string>-WOPort</string>
95 <string>1085</string>
96 </array>
97 <key>ServiceIPC</key>
98 <false/>
99 <key>UserName</key>
100 <string>appserver</string>
101 </dict>
102 </plist>
103
104 {{/code}}
105
106 Create ///Library/LaunchDaemons/com.apple.webobjects.womonitor.plist// with:
David Holt 31.1 107 (for OSX 10.5 make sure the permissions of this file are 644 system/wheel/everyone otherwise launchctl will throw a "dubious permissions" error when you try to load the plist with the commands that follow)
Gavin Eadie 23.1 108
109 {{code}}
110
111 <?xml version="1.0" encoding="UTF-8"?>
112 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
113 <plist version="1.0">
114 <dict>
115 <key>Disabled</key>
116 <false/>
117 <key>GroupName</key>
118 <string>appserverusr</string>
119 <key>Label</key>
120 <string>com.apple.webobjects.womonitor</string>
121 <key>OnDemand</key>
122 <false/>
123 <key>Program</key>
124 <string>/System/Library/WebObjects/JavaApplications/JavaMonitor.woa/JavaMonitor</string>
125 <key>ProgramArguments</key>
126 <array>
127 <string>JavaMonitor</string>
128 <string>-WOPort</string>
129 <string>56789</string>
130 </array>
131 <key>ServiceIPC</key>
132 <false/>
133 <key>UserName</key>
134 <string>appserver</string>
135 </dict>
136 </plist>
137
138 {{/code}}
139
140 Start the launchd daemons :
David Holt 31.1 141 (you may need to sudo here)
Gavin Eadie 23.1 142
143 {{code}}
144
145 launchctl load /Library/LaunchDaemons/com.apple.webobjects.wotaskd.plist
146 launchctl load /Library/LaunchDaemons/com.apple.webobjects.womonitor.plist
147
148 {{/code}}
149
David Holt 31.1 150 If you run "ps auxw grep java" you should see wotaskd and java monitor now running. You should be able to connect to Monitor by this URL:
Gavin Eadie 23.1 151
152 {{code}}
153
154 http://localhost:56789
155
156 {{/code}}