Wiki source code of WO 5.4 Getting Started

Version 74.1 by D Tim Cummings on 2011/11/21 00:34

Hide last authors
Pascal Robert 73.1 1 {{toc maxLevel="1"}}{{/toc}}
Pascal Robert 61.1 2
Pascal Robert 73.1 3 = ProjectBuilder and XCode =
Pascal Robert 61.1 4
Pascal Robert 73.1 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.
Pascal Robert 61.1 6
Pascal Robert 73.1 7 = Installing WebObjects and WOLips =
Pascal Robert 61.1 8
Pascal Robert 73.1 9 1. h6. Download Golipse
10 [[Golipse>>https://github.com/downloads/rebeld/Golipse/Golipse.app_build_13.zip]] ([[source>>https://github.com/rebeld/Golipse]]) will fetch the needed version of Eclipse, WOLips and other tools for WebObjects development.
Pascal Robert 61.1 11
Pascal Robert 73.1 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...//.
Pascal Robert 61.1 20 [[image:PerpectiveMenu.png]]
Pascal Robert 73.1 21 1*. h6. Select //WOLips// and click //Ok//.
Pascal Robert 61.1 22 [[image:PerspectiveChoices.png]]
23
Pascal Robert 73.1 24 {{note title="WOLips Perspective"}}
Pascal Robert 61.1 25 If you don't switch to the WOLips perspective, you won't be able to create new WebObjects projects.
Pascal Robert 73.1 26 {{/note}}
Pascal Robert 61.1 27
Pascal Robert 73.1 28 {{info title="Xcode & WebObjects"}}
Pascal Robert 61.1 29
Pascal Robert 73.1 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]
Pascal Robert 53.1 33
Pascal Robert 73.1 34 {{/info}}
Gavin Eadie 23.1 35
Pascal Robert 73.1 36 {{id value="javamonitor"}}{{/id}}
David Avendasora 39.1 37
Pascal Robert 73.1 38 = Running Monitor and wotaskd on Mac OS X =
David Avendasora 39.1 39
Pascal Robert 61.1 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
Quinton Dolan 63.1 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).
Pascal Robert 61.1 43
Quinton Dolan 63.1 44 Edit ///etc/apache2/httpd.conf// (if you did a fresh install, you may already have these - search httpd.conf first)
Pascal Robert 61.1 45
Quinton Dolan 63.1 46 Search for rewrite//module, and above it, add this line~://
Pascal Robert 61.1 47
48 {{code}}
49
50 LoadModule WebObjects_module /System/Library/WebObjects/Adaptors/Apache2.2/mod_WebObjects.so
51
52 {{/code}}
53
Quinton Dolan 63.1 54 Go to the very end and add:
Pascal Robert 61.1 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
Quinton Dolan 63.1 83 If you run //ps auxw grep httpd// you should see apache now running
Pascal Robert 61.1 84
85 Create ///Library/LaunchDaemons/com.apple.webobjects.wotaskd.plist// with:
Pascal Robert 73.1 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)
Pascal Robert 61.1 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
Quinton Dolan 63.1 119 Create ///Library/LaunchDaemons/com.apple.webobjects.womonitor.plist// with:
Pascal Robert 73.1 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)
Pascal Robert 61.1 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 :
Pascal Robert 73.1 154 (you may need to sudo here)
Pascal Robert 61.1 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}}