Changes for page WO 5.4 Getting Started
Last modified by D Tim Cummings on 2013/06/14 16:27
From version 73.1
edited by Pascal Robert
on 2012/01/21 22:06
on 2012/01/21 22:06
Change comment:
There is no comment for this version
To version 55.1
edited by Pascal Robert
on 2007/11/29 13:44
on 2007/11/29 13:44
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,173 +1,39 @@ 1 -{{warning}} 2 -This is deprecated information! 3 -{{/warning}} 1 += Running the examples = 4 4 5 - {{toc maxLevel="1"}}{{/toc}}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//. 6 6 7 - =ProjectBuilderandXCode=5 +The first step is: install Eclipse and WOLips :-) 8 8 9 - ProjectBuilderand Xcodere no longer supportedIDEsfor WebObjectsdevelopmentor deployment. Whilelegacyprojects maystill useit there islittle, if any, supportavailableforit.Existing projects (except Objective-CWebObjectsprojects, of course)shouldbe [[migrated toWOLips>>WOL:XcodeMigration]]. It isn'tshardas youmight think,and WOLips is a much morepowerfulWebObjects IDE.7 +Some examples needs Derby, an embedded Java database (OpenBase is not included with WO anymore). To install the databases, you have to do: 10 10 11 -= Installing WebObjects and WOLips = 12 - 13 -1. h6. Download Golipse 14 -[[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. 15 - 16 -{{note title="32-bit computers"}} 17 -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" 18 -{{/note}} 19 - 20 -1. h6. Install the WebObjects 21 -The best way to install the WebObjects frameworks is according to [[these instructions>>WOL:Using WOLips With Multiple Versions of WebObjects]]. 22 -1. h6. Start Eclipse and switch to the WOLips perspective. 23 -1*. Under the //Window// menu, select //Open Perspective > Other...//. 24 -[[image:PerpectiveMenu.png]] 25 -1*. h6. Select //WOLips// and click //Ok//. 26 -[[image:PerspectiveChoices.png]] 27 - 28 -{{note title="WOLips Perspective"}} 29 -If you don't switch to the WOLips perspective, you won't be able to create new WebObjects projects. 30 -{{/note}} 31 - 32 -{{info title="Xcode & WebObjects"}} 33 - 34 -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. 35 -* Apple Developer Site (Free): [http://developer.apple.com/xcode/] 36 -* Mac OS X App Store (Free): [http://itunes.apple.com/us/app/xcode/id448457090] 37 - 38 -{{/info}} 39 - 40 -{{id value="javamonitor"}}{{/id}} 41 - 42 -= Running Monitor and wotaskd on Mac OS X = 43 - 44 -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. 45 - 46 -Make sure //Web Sharing// is enabled in the //Sharing// panel in //System Preferences// (note: 10.5 comes with Apache 2.2 as the default). 47 - 48 -Edit ///etc/apache2/httpd.conf// (if you did a fresh install, you may already have these - search httpd.conf first) 49 - 50 -Search for rewrite//module, and above it, add this line~:// 51 - 52 52 {{code}} 53 53 54 -LoadModule WebObjects_module /System/Library/WebObjects/Adaptors/Apache2.2/mod_WebObjects.so 11 +cd /Developer/Examples/JavaWebObjects/ 12 +sudo sh installDatabases.sh <yourusername> 55 55 56 56 {{/code}} 57 57 58 -Go to the very end and add: 16 +Now, you can import the examples into Eclipse. Start Eclipse, select //File// > //Import//, 17 + [[image:ImportMenu.png]] 18 + 19 +and select //General// > //Existing Projects// into Workplace. 59 59 60 -{{code}} 21 +[[image:ImportGeneral.png]] 22 + 23 +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. [[image:ImportProjectsList.png]] 61 61 62 -Include /System/Library/WebObjects/Adaptors/Apache2.2/apache.conf 25 +After the importation is done, you should see the projects in the WO Package Explorer. If you see the projects in Package Explorer (without "WO" in the name), that means that you are using the Java perpective instead of the WOLips perpective. Switch the perpective to WOLips. [[image:PackageExplorer.png]] 26 + 27 +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 :-)For each project, right-click on each project, select //Build Path// > //Configure Build Path...// [[image:BuildPathMenu.png]] 28 + 29 +Click on the //Projects// tab, select the references to the WO frameworks that have the Warning icon and click //Remove//. [[image:ConfigureBuildPath.png]] 30 +Click on the //Libraries// tab, click the //Add Library// button. Select //WebObjects Frameworks// and click //Next//. [[image:AddLibrary.png]] 31 + 32 +Click //System//, open the triangle next to //System// and make sure that //JavaEOAccess//, //JavaEOControl//, //JavaFoundation//, //JavaWebObjects//, //JavaWOExtensions// and //JavaXML// are selected. For //SchoolToolsClient//, you also need to add //JavaWebServicesSupport// and //JavaWebServicesClient// to the build path. For the //SchoolToolsServer//, you need to add //JavaWebServicesSupport//. 63 63 64 - {{/code}}34 +After you corrected the build path on a project, the project will rebuild itself and the errors shoud dissapear. 65 65 66 -Search for "Directory /" and comment out the Order and Deny lines: 67 - 68 -{{code}} 69 - 70 -<Directory /> 71 - Options FollowSymLinks 72 - AllowOverride None 73 - #Order deny,allow 74 - #Deny from all 75 -</Directory> 76 - 77 -{{/code}} 78 - 79 -Restart apache 80 - 81 -{{code}} 82 - 83 -sudo apachectl graceful 84 - 85 -{{/code}} 86 - 87 -If you run //ps auxw grep httpd// you should see apache now running 88 - 89 -Create ///Library/LaunchDaemons/com.apple.webobjects.wotaskd.plist// with: 90 -(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) 91 - 92 -{{code}} 93 - 94 -<?xml version="1.0" encoding="UTF-8"?> 95 -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 96 -<plist version="1.0"> 97 -<dict> 98 - <key>Disabled</key> 99 - <false/> 100 - <key>GroupName</key> 101 - <string>appserverusr</string> 102 - <key>Label</key> 103 - <string>com.apple.webobjects.wotaskd</string> 104 - <key>OnDemand</key> 105 - <false/> 106 - <key>Program</key> 107 - <string>/System/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd</string> 108 - <key>ProgramArguments</key> 109 - <array> 110 - <string>wotaskd</string> 111 - <string>-WOPort</string> 112 - <string>1085</string> 113 - </array> 114 - <key>ServiceIPC</key> 115 - <false/> 116 - <key>UserName</key> 117 - <string>appserver</string> 118 -</dict> 119 -</plist> 120 - 121 -{{/code}} 122 - 123 -Create ///Library/LaunchDaemons/com.apple.webobjects.womonitor.plist// with: 124 -(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) 125 - 126 -{{code}} 127 - 128 -<?xml version="1.0" encoding="UTF-8"?> 129 -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 130 -<plist version="1.0"> 131 -<dict> 132 - <key>Disabled</key> 133 - <false/> 134 - <key>GroupName</key> 135 - <string>appserverusr</string> 136 - <key>Label</key> 137 - <string>com.apple.webobjects.womonitor</string> 138 - <key>OnDemand</key> 139 - <false/> 140 - <key>Program</key> 141 - <string>/System/Library/WebObjects/JavaApplications/JavaMonitor.woa/JavaMonitor</string> 142 - <key>ProgramArguments</key> 143 - <array> 144 - <string>JavaMonitor</string> 145 - <string>-WOPort</string> 146 - <string>56789</string> 147 - </array> 148 - <key>ServiceIPC</key> 149 - <false/> 150 - <key>UserName</key> 151 - <string>appserver</string> 152 -</dict> 153 -</plist> 154 - 155 -{{/code}} 156 - 157 -Start the launchd daemons : 158 -(you may need to sudo here) 159 - 160 -{{code}} 161 - 162 -launchctl load /Library/LaunchDaemons/com.apple.webobjects.wotaskd.plist 163 -launchctl load /Library/LaunchDaemons/com.apple.webobjects.womonitor.plist 164 - 165 -{{/code}} 166 - 167 -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: 168 - 169 -{{code}} 170 - 171 -http://localhost:56789 172 - 173 -{{/code}} 36 +//JavaBusinessLogic// and //RelatedLinks// requires Apache Derby, but the path to Derby's JAR is wrong. Remove the JAR from the build path, click //Add External JARs...//, browse your disk up to ///Developer/Examples/JavaWebObjects/Databases/db-derby-10.2.2.0-bin/lib// and select //derby.jar//. The build path should look like this: 37 +[[image:GoodDerbyPath.png]] 38 + 39 +VoilĂ You finally can run the examples.