Wiki source code of WO 5.4 Getting Started

Version 25.1 by jbrook on 2011/10/31 16:09

Hide last authors
Gavin Eadie 23.1 1 {{toc maxLevel="1"}}{{/toc}}
2
3 = ProjectBuilder and XCode =
4
5 ProjectBuilder and Xcode are no longer supported IDEs for WebObjects development or deployment. While legacy projects may still use it there is little, if any, support available for it. Existing projects (except Objective-C WebObjects projects, of course) should be [[migrated to WOLips>>WOL:XcodeMigration]]. It isn't as hard as you might think, and WOLips is a much more powerful WebObjects IDE.
6
7 = Installing WebObjects and WOLips =
8
9 1. h6. Download Golipse
jbrook 25.1 10 [[Golipse>>https://github.com/downloads/rebeld/Golipse/Golipse.app_build_12.zip]] ([[source>>https://github.com/rebeld/Golipse]]) will fetch the needed version of Eclipse, WOLips and other tools for WebObjects development.
Gavin Eadie 23.1 11
12 {{note title="32-bit computers"}}
13 By default Golipse will download and install a 64-bit version of Eclipse. If you have an older 32-bit machine you can specify the download URL for the Eclipse package in 'Golipse > Preferences'. The latest 32-bit package is "http://ftp.osuosl.org/pub/eclipse/eclipse/downloads/drops/R-3.6.2-201102101200/eclipse-SDK-3.6.2-macosx-cocoa.tar.gz"
14 {{/note}}
15
16 1. h6. Install the WebObjects
17 The best way to install the WebObjects frameworks is according to [[these instructions>>WOL:Using WOLips With Multiple Versions of WebObjects]].
18 1. h6. Start Eclipse and switch to the WOLips perspective.
19 1*. Under the //Window// menu, select //Open Perspective > Other...//.
20 [[image:PerpectiveMenu.png]]
21 1*. h6. Select //WOLips// and click //Ok//.
22 [[image:PerspectiveChoices.png]]
23
24 {{note title="WOLips Perspective"}}
25 If you don't switch to the WOLips perspective, you won't be able to create new WebObjects projects.
26 {{/note}}
27
28 {{info title="Xcode & WebObjects"}}
29
30 Xcode is no longer the supported IDE for WebObjects development or deployment. However, downloading it and installing it will install tools debugging tools that you might find useful.
31 * Apple Developer Site (Free): [http://developer.apple.com/xcode/]
32 * Mac OS X App Store (Free): [http://itunes.apple.com/us/app/xcode/id448457090]
33
34 {{/info}}
35
36 {{id value="javamonitor"}}{{/id}}
37
38 = Running Monitor and wotaskd on Mac OS X =
39
40 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.
41
42 Make sure //Web Sharing// is enabled in the //Sharing// panel in //System Preferences// (note: 10.5 comes with Apache 2.2 as the default).
43
44 Edit ///etc/apache2/httpd.conf// (if you did a fresh install, you may already have these - search httpd.conf first)
45
46 Search for rewrite//module, and above it, add this line~://
47
48 {{code}}
49
50 LoadModule WebObjects_module /System/Library/WebObjects/Adaptors/Apache2.2/mod_WebObjects.so
51
52 {{/code}}
53
54 Go to the very end and add:
55
56 {{code}}
57
58 Include /System/Library/WebObjects/Adaptors/Apache2.2/apache.conf
59
60 {{/code}}
61
62 Search for "Directory /" and comment out the Order and Deny lines:
63
64 {{code}}
65
66 <Directory />
67 Options FollowSymLinks
68 AllowOverride None
69 #Order deny,allow
70 #Deny from all
71 </Directory>
72
73 {{/code}}
74
75 Restart apache
76
77 {{code}}
78
79 sudo apachectl graceful
80
81 {{/code}}
82
83 If you run //ps auxw grep httpd// you should see apache now running
84
85 Create ///Library/LaunchDaemons/com.apple.webobjects.wotaskd.plist// with:
86 (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)
87
88 {{code}}
89
90 <?xml version="1.0" encoding="UTF-8"?>
91 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
92 <plist version="1.0">
93 <dict>
94 <key>Disabled</key>
95 <false/>
96 <key>GroupName</key>
97 <string>appserverusr</string>
98 <key>Label</key>
99 <string>com.apple.webobjects.wotaskd</string>
100 <key>OnDemand</key>
101 <false/>
102 <key>Program</key>
103 <string>/System/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd</string>
104 <key>ProgramArguments</key>
105 <array>
106 <string>wotaskd</string>
107 <string>-WOPort</string>
108 <string>1085</string>
109 </array>
110 <key>ServiceIPC</key>
111 <false/>
112 <key>UserName</key>
113 <string>appserver</string>
114 </dict>
115 </plist>
116
117 {{/code}}
118
119 Create ///Library/LaunchDaemons/com.apple.webobjects.womonitor.plist// with:
120 (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)
121
122 {{code}}
123
124 <?xml version="1.0" encoding="UTF-8"?>
125 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
126 <plist version="1.0">
127 <dict>
128 <key>Disabled</key>
129 <false/>
130 <key>GroupName</key>
131 <string>appserverusr</string>
132 <key>Label</key>
133 <string>com.apple.webobjects.womonitor</string>
134 <key>OnDemand</key>
135 <false/>
136 <key>Program</key>
137 <string>/System/Library/WebObjects/JavaApplications/JavaMonitor.woa/JavaMonitor</string>
138 <key>ProgramArguments</key>
139 <array>
140 <string>JavaMonitor</string>
141 <string>-WOPort</string>
142 <string>56789</string>
143 </array>
144 <key>ServiceIPC</key>
145 <false/>
146 <key>UserName</key>
147 <string>appserver</string>
148 </dict>
149 </plist>
150
151 {{/code}}
152
153 Start the launchd daemons :
154 (you may need to sudo here)
155
156 {{code}}
157
158 launchctl load /Library/LaunchDaemons/com.apple.webobjects.wotaskd.plist
159 launchctl load /Library/LaunchDaemons/com.apple.webobjects.womonitor.plist
160
161 {{/code}}
162
163 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:
164
165 {{code}}
166
167 http://localhost:56789
168
169 {{/code}}