Changes for page WO 5.4 Getting Started

Last modified by D Tim Cummings on 2013/06/14 16:27

From version 59.1
edited by Pascal Robert
on 2007/11/29 13:48
Change comment: There is no comment for this version
To version 61.1
edited by Pascal Robert
on 2007/11/29 14:04
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,3 +1,25 @@
1 +{{toc}}{{/toc}}
2 +
3 += Installing WebObjects and WOLips =
4 +
5 +Download Xcode 3 from [[ADC>>http://developer.apple.com/leopard/devcenter/]], the WebObjects frameworks are included in this package. You will have to make a custom install and select //WebObjects// in the package list since WebObjects is not part of the default installation.
6 +
7 +Install [[Eclipse 3.3.1.1>>http://www.eclipse.org/downloads/download.php?file=//eclipse/downloads/drops/R-3.3.1.1-200710231652/eclipse-SDK-3.3.1.1-macosx-carbon.tar.gz]] (yes that's an extra .1) which fixes the permgen space bug from 3.3.1
8 +
9 +[[Install>>WOL:Install WOLips with Eclipse Update Manager]] WOLips from the [[nightly>>http://webobjects.mdimension.com/wolips/nightly]] build server
10 +
11 +Start Eclipse and switch to the WOLips perspective. To achieve this, open the //Window// menu, select //Open Perspective// and select //Other...//.
12 +
13 +[[image:PerpectiveMenu.png]]
14 +
15 +In the perspective choices, select //WOLips// and click //Ok//.
16 +
17 +[[image:PerspectiveChoices.png]]
18 +
19 +If you don't switch to the WOLips perspective, you won't be able to create new WebObjects projects.
20 +
21 +You are now ready to create projects or importing the examples. 
22 +
1 1  = Running the examples =
2 2  
3 3  Apple has converted their WebObjects examples in the Eclipse format, but no documentation is provided on how to import them into Eclipse.  The examples are in ///Developer/Examples/JavaWebObjects//.
... ... @@ -53,3 +53,215 @@
53 53  [[image:GoodDerbyPath.png]]
54 54  
55 55  VoilĂ   You finally can run the examples. 
78 +
79 += Running Monitor and wotaskd on Mac OS X 10.5 "client" =
80 +
81 +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.
82 +
83 +Make sure Web Sharing is enabled in the Sharing Prefs Panel
84 +
85 +Note: /etc/httpd is out, /etc/apache2 is in
86 +Edit /etc/apache2/httpd.conf (if you did a fresh install, you may already have these - search httpd.conf first)
87 +
88 +search for rewrite//module, and above it, add a//
89 +
90 +{{code}}
91 +
92 +LoadModule WebObjects_module /System/Library/WebObjects/Adaptors/Apache2.2/mod_WebObjects.so
93 +
94 +{{/code}}
95 +
96 +go to the very end and add
97 +
98 +{{code}}
99 +
100 +Include /System/Library/WebObjects/Adaptors/Apache2.2/apache.conf
101 +
102 +{{/code}}
103 +
104 +Search for "Directory /" and comment out the Order and Deny lines:
105 +
106 +{{code}}
107 +
108 +<Directory />
109 + Options FollowSymLinks
110 + AllowOverride None
111 + #Order deny,allow
112 + #Deny from all
113 +</Directory>
114 +
115 +{{/code}}
116 +
117 +Restart apache
118 +
119 +{{code}}
120 +
121 +sudo apachectl graceful
122 +
123 +{{/code}}
124 +
125 +if you run "ps auxw grep httpd" you should see apache now running
126 +
127 +Create ///Library/LaunchDaemons/com.apple.webobjects.wotaskd.plist// with:
128 +
129 +{{code}}
130 +
131 +<?xml version="1.0" encoding="UTF-8"?>
132 +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
133 +<plist version="1.0">
134 +<dict>
135 + <key>Disabled</key>
136 + <false/>
137 + <key>GroupName</key>
138 + <string>appserverusr</string>
139 + <key>Label</key>
140 + <string>com.apple.webobjects.wotaskd</string>
141 + <key>OnDemand</key>
142 + <false/>
143 + <key>Program</key>
144 + <string>/System/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd</string>
145 + <key>ProgramArguments</key>
146 + <array>
147 + <string>wotaskd</string>
148 + <string>-WOPort</string>
149 + <string>1085</string>
150 + </array>
151 + <key>ServiceIPC</key>
152 + <false/>
153 + <key>UserName</key>
154 + <string>appserver</string>
155 +</dict>
156 +</plist>
157 +
158 +{{/code}}
159 +
160 + Create ///Library/LaunchDaemons/com.apple.webobjects.womonitor.plist// with:
161 +
162 +{{code}}
163 +
164 +<?xml version="1.0" encoding="UTF-8"?>
165 +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
166 +<plist version="1.0">
167 +<dict>
168 + <key>Disabled</key>
169 + <false/>
170 + <key>GroupName</key>
171 + <string>appserverusr</string>
172 + <key>Label</key>
173 + <string>com.apple.webobjects.womonitor</string>
174 + <key>OnDemand</key>
175 + <false/>
176 + <key>Program</key>
177 + <string>/System/Library/WebObjects/JavaApplications/JavaMonitor.woa/JavaMonitor</string>
178 + <key>ProgramArguments</key>
179 + <array>
180 + <string>JavaMonitor</string>
181 + <string>-WOPort</string>
182 + <string>56789</string>
183 + </array>
184 + <key>ServiceIPC</key>
185 + <false/>
186 + <key>UserName</key>
187 + <string>appserver</string>
188 +</dict>
189 +</plist>
190 +
191 +{{/code}}
192 +
193 +Start the launchd daemons :
194 +
195 +{{code}}
196 +
197 +launchctl load /Library/LaunchDaemons/com.apple.webobjects.wotaskd.plist
198 +launchctl load /Library/LaunchDaemons/com.apple.webobjects.womonitor.plist
199 +
200 +{{/code}}
201 +
202 +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:
203 +
204 +{{code}}
205 +
206 +http://localhost:56789
207 +
208 +{{/code}}
209 +
210 += Developing with both WebObjects 5.4 and 5.3 =
211 +
212 +The following can be done a couple ways, but this is just how I happened to have things setup in betas, so I kept it (it worked for me):
213 + Make a ///System/Library/Frameworks/WebObjects54// folder, and move the following frameworks from the 5.4 install into it:
214 +
215 +{{code}}
216 +
217 +JavaDTWGeneration.framework
218 +JavaDirectToWeb.framework
219 +JavaEOAccess.framework
220 +JavaEOApplication.framework
221 +JavaEOControl.framework
222 +JavaEODistribution.framework
223 +JavaEOGeneration.framework
224 +JavaEOInterface.framework
225 +JavaEOInterfaceCocoa.framework
226 +JavaEOInterfaceSwing.framework
227 +JavaEOProject.framework
228 +JavaEORuleSystem.framework
229 +JavaEOTool.framework
230 +JavaFoundation.framework
231 +JavaJDBCAdaptor.framework
232 +JavaJNDIAdaptor.framework
233 +JavaWOExtensions.framework
234 +JavaWOJSPServlet.framework
235 +JavaWebObjects.framework
236 +JavaWebServicesClient.framework
237 +JavaWebServicesGeneration.framework
238 +JavaWebServicesSupport.framework
239 +JavaXML.framework
240 +
241 +{{/code}}
242 +
243 +Make a ///System/Library/Frameworks/WebObjects53// folder, and move the following frameworks from your old 5.3 install into it (I tar'd these up from 5.3 before upgrading, but you can download 5.3 and extract these from the pkg, or POSSIBLY install them with the actually installer ... YMMV on that one)
244 +
245 +{{code}}
246 +
247 +JavaDTWGeneration.framework
248 +JavaDirectToWeb.framework
249 +JavaEOAccess.framework
250 +JavaEOApplication.framework
251 +JavaEOCocoa.framework
252 +JavaEOControl.framework
253 +JavaEODistribution.framework
254 +JavaEOGeneration.framework
255 +JavaEOInterface.framework
256 +JavaEOInterfaceCocoa.framework
257 +JavaEOInterfaceSwing.framework
258 +JavaEOProject.framework
259 +JavaEORuleSystem.framework
260 +JavaEOTool.framework
261 +JavaFoundation.framework
262 +JavaJDBCAdaptor.framework
263 +JavaJNDIAdaptor.framework
264 +JavaWOExtensions.framework
265 +JavaWOJSPServlet.framework
266 +JavaWebObjects.framework
267 +JavaWebServicesClient.framework
268 +JavaWebServicesGeneration.framework
269 +JavaWebServicesSupport.framework
270 +JavaXML.framework
271 +
272 +{{/code}}
273 +
274 +I then use the following two scripts to be able to switch between using 5.3 and 5.4 system wide:
275 +
276 +{{code}}
277 +
278 +bash-3.2# cat wo53
279 +for framework in `ls /System/Library/Frameworks/WebObjects53`; do rm /System/Library/Frameworks/$framework; ln \-sf /System/Library/Frameworks/WebObjects53/$framework /System/Library/Frameworks/$framework; done
280 +bash-3.2# cat wo54
281 +for framework in `ls /System/Library/Frameworks/WebObjects54`; do rm /System/Library/Frameworks/$framework; ln \-sf /System/Library/Frameworks/WebObjects54/$framework /System/Library/Frameworks/$framework; done
282 +
283 +{{/code}}
284 +
285 +At this point, you should have NO WO frameworks in /System/Library/Frameworks they should be in subfolders.
286 +
287 +Now go ahead and run wo53, which should now give you WO 5.3 framework symlinks.
288 +
289 +You may need to do a clean build of your projects in Eclipse If things are setup properly, you should not get any Java errors you didn't already have.