Changes for page WO 5.4 Getting Started

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

From version 51.1
edited by Pascal Robert
on 2007/11/27 22:25
Change comment: There is no comment for this version
To version 29.1
edited by Timothy Worman
on 2013/05/01 19:19
Change comment: Migrated to Confluence 4.0

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.probert
1 +XWiki.tworman
Content
... ... @@ -1,34 +1,186 @@
1 -Apple has converted their WebObjects examples in the Eclipse format, but no documentation is provided on how to import them into Eclipse.
1 +{{warning}}
2 +This is deprecated information!
3 +{{/warning}}
2 2  
3 -The examples are in /Developer/Examples/JavaWebObjects
5 +{{toc maxLevel="1"/}}
4 4  
5 -Some examples needs Apache Derby, an embedded Java database (OpenBase is not included with WO anymore). To install the databases, you have to do:
7 += ProjectBuilder and XCode =
6 6  
9 +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>>doc:WOL.XcodeMigration]]. It isn't as hard as you might think, and WOLips is a much more powerful WebObjects IDE.
10 +
11 += Installing WebObjects and WOLips =
12 +
13 +1. (((
14 +====== Download Golipse ======
15 +
16 +[[Golipse>>url:http://wocommunity.org/documents/tools/Golipse.app_build_14.zip||shape="rect"]] ([[source>>url:https://github.com/wocommunity/Golipse||shape="rect"]]) will fetch the needed version of Eclipse, WOLips and other tools for WebObjects development.
17 +)))
18 +
19 +{{note title="32-bit computers"}}
20 +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"
21 +{{/note}}
22 +
23 +1. (((
24 +====== Install the WebObjects ======
25 +
26 +The best way to install the WebObjects frameworks is according to [[these instructions>>doc:WOL.Using WOLips With Multiple Versions of WebObjects]].
27 +)))
28 +1. (((
29 +====== Start Eclipse and switch to the WOLips perspective. ======
30 +
31 +* Under the //Window// menu, select //Open Perspective > Other...//.
32 +[[image:attach:PerpectiveMenu.png]]
33 +*
34 +
35 +====== Select //WOLips// and click //Ok//. ======
36 +
37 +[[image:attach:PerspectiveChoices.png]]
38 +
39 +{{note title="WOLips Perspective"}}
40 +If you don't switch to the WOLips perspective, you won't be able to create new WebObjects projects.
41 +{{/note}}
42 +)))
43 +
44 +{{info title="Xcode & WebObjects"}}
45 +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.
46 +
47 +* Apple Developer Site (Free): [[http:~~/~~/developer.apple.com/xcode/>>url:http://developer.apple.com/xcode/||shape="rect"]]
48 +* Mac OS X App Store (Free): [[http:~~/~~/itunes.apple.com/us/app/xcode/id448457090>>url:http://itunes.apple.com/us/app/xcode/id448457090||shape="rect"]]
49 +{{/info}}
50 +
51 +
52 +
53 +{{id name="javamonitor"/}}
54 +
55 += Running Monitor and wotaskd on Mac OS X =
56 +
57 +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.
58 +
59 +Make sure //Web Sharing// is enabled in the //Sharing// panel in //System Preferences// (note: 10.5 comes with Apache 2.2 as the default).
60 +
61 +Edit ///etc/apache2/httpd.conf// (if you did a fresh install, you may already have these - search httpd.conf first)
62 +
63 +Search for rewrite_module, and above it, add this line:
64 +
7 7  {{code}}
8 8  
9 -cd /Developer/Examples/JavaWebObjects/
10 -sudo sh installDatabases.sh <yourusername>
67 +LoadModule WebObjects_module /System/Library/WebObjects/Adaptors/Apache2.2/mod_WebObjects.so
11 11  
12 12  {{/code}}
13 13  
14 -Now, you can import the examples into Eclipse. Start Eclipse, select File -> Import, and select General -> Existing Projects into Workplace.
71 +Go to the very end and add:
15 15  
16 -On the next page, select Select root directory and browse your disk to /Developer/Examples/JavaWebObjects. You should see a list of projects to import. Deselect the second javaeoutil project, or else you won't be able to import the projects.
73 +{{code}}
17 17  
18 -You should see the projects in the WO Package Explorer. If you see the projects in Package Explorer (without the WO), that means that you are using the Java perpective instead of the WOLips perpective.
75 +Include /System/Library/WebObjects/Adaptors/Apache2.2/apache.conf
19 19  
20 -Now, you need to fix the examples, because the build path is pointing to the source projects of the WO frameworks, source that nobody outside Apple has access to :-)
77 +{{/code}}
21 21  
22 -For each project, right-click on each project, select Build Path -> Configure Build Path...
79 +Search for "Directory /" and comment out the Order and Deny lines:
23 23  
24 -Click on the Projects tab, select the references to the WO frameworks and click Remove
81 +{{code}}
25 25  
26 -Click on the Libraries tab, click the Add Library button
83 +<Directory />
84 + Options FollowSymLinks
85 + AllowOverride None
86 + #Order deny,allow
87 + #Deny from all
88 +</Directory>
27 27  
28 -Select WebObjects Frameworks and click Next
90 +{{/code}}
29 29  
30 -Click System, open the triangle next to System and make sure that JavaEOAccess, JavaEOControl, JavaFoundation, JavaWebObjects, JavaWOExtensions and JavaXML are selected. For the SchoolToolsClient, you also need to add the JavaWebServicesSupport and JavaWebServicesClient. For the SchoolToolsServer, you also need to add the JavaWebServicesSupport.
92 +Restart apache
31 31  
32 -After you corrected the build path, the project will rebuild itself and the errors shoud dissapear
94 +{{code}}
33 33  
34 -You also have to fix the build path for JavaBusinessLogic and RelatedLinks because the Derby path is incorrect.
96 +sudo apachectl graceful
97 +
98 +{{/code}}
99 +
100 +If you run //ps auxw | grep httpd// you should see apache now running
101 +
102 +Create ///Library/LaunchDaemons/com.apple.webobjects.wotaskd.plist// with:
103 + (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)
104 +
105 +{{code}}
106 +
107 +<?xml version="1.0" encoding="UTF-8"?>
108 +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
109 +<plist version="1.0">
110 +<dict>
111 + <key>Disabled</key>
112 + <false/>
113 + <key>GroupName</key>
114 + <string>appserverusr</string>
115 + <key>Label</key>
116 + <string>com.apple.webobjects.wotaskd</string>
117 + <key>OnDemand</key>
118 + <false/>
119 + <key>Program</key>
120 + <string>/System/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd</string>
121 + <key>ProgramArguments</key>
122 + <array>
123 + <string>wotaskd</string>
124 + <string>-WOPort</string>
125 + <string>1085</string>
126 + </array>
127 + <key>ServiceIPC</key>
128 + <false/>
129 + <key>UserName</key>
130 + <string>appserver</string>
131 +</dict>
132 +</plist>
133 +
134 +{{/code}}
135 +
136 +Create ///Library/LaunchDaemons/com.apple.webobjects.womonitor.plist// with:
137 + (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)
138 +
139 +{{code}}
140 +
141 +<?xml version="1.0" encoding="UTF-8"?>
142 +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
143 +<plist version="1.0">
144 +<dict>
145 + <key>Disabled</key>
146 + <false/>
147 + <key>GroupName</key>
148 + <string>appserverusr</string>
149 + <key>Label</key>
150 + <string>com.apple.webobjects.womonitor</string>
151 + <key>OnDemand</key>
152 + <false/>
153 + <key>Program</key>
154 + <string>/System/Library/WebObjects/JavaApplications/JavaMonitor.woa/JavaMonitor</string>
155 + <key>ProgramArguments</key>
156 + <array>
157 + <string>JavaMonitor</string>
158 + <string>-WOPort</string>
159 + <string>56789</string>
160 + </array>
161 + <key>ServiceIPC</key>
162 + <false/>
163 + <key>UserName</key>
164 + <string>appserver</string>
165 +</dict>
166 +</plist>
167 +
168 +{{/code}}
169 +
170 +Start the launchd daemons :
171 + (you may need to sudo here)
172 +
173 +{{code}}
174 +
175 +launchctl load /Library/LaunchDaemons/com.apple.webobjects.wotaskd.plist
176 +launchctl load /Library/LaunchDaemons/com.apple.webobjects.womonitor.plist
177 +
178 +{{/code}}
179 +
180 +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:
181 +
182 +{{code}}
183 +
184 +http://localhost:56789
185 +
186 +{{/code}}