Changes for page WO 5.4 Getting Started
Last modified by D Tim Cummings on 2013/06/14 16:27
From version 74.1
edited by D Tim Cummings
on 2011/11/21 00:34
on 2011/11/21 00:34
Change comment:
There is no comment for this version
To version 56.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 (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki.t imcu1 +XWiki.probert - Content
-
... ... @@ -1,169 +1,39 @@ 1 - {{tocmaxLevel="1"}}{{/toc}}1 += Running the examples = 2 2 3 - =ProjectBuilderandXCode=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//. 4 4 5 - ProjectBuilderand Xcode are no longer supported IDEsfor WebObjects development or deployment. While legacy projectsmay stilluse itthereislittle, if any,supportvailablefor it.Existing projects (except Objective-C WebObjects projects, of course) should be [[migrated to WOLips>>WOL:XcodeMigration]].It isn'tas hard as you might think, and WOLipsis a much more powerful WebObjectsIDE.5 +The first step is: install Eclipse and WOLips :-) 6 6 7 - =InstallingWebObjects and WOLips=7 +Some examples needs Derby, an embedded Java database (OpenBase is not included with WO anymore). To install the databases, you have to do: 8 8 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. 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 48 {{code}} 49 49 50 -LoadModule WebObjects_module /System/Library/WebObjects/Adaptors/Apache2.2/mod_WebObjects.so 11 +cd /Developer/Examples/JavaWebObjects/ 12 +sudo sh installDatabases.sh <yourusername> 51 51 52 52 {{/code}} 53 53 54 -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. 55 55 56 -{{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]] 57 57 58 -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//. 59 59 60 - {{/code}}34 +After you corrected the build path on a project, the project will rebuild itself and the errors shoud dissapear. 61 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}} 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.