Changes for page WO 5.4 Getting Started
Last modified by D Tim Cummings on 2013/06/14 16:27
From version 57.1
edited by Pascal Robert
on 2007/11/29 13:45
on 2007/11/29 13:45
Change comment:
There is no comment for this version
To version 39.1
edited by David Avendasora
on 2011/05/22 11:37
on 2011/05/22 11:37
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. probert1 +XWiki.avendasora - Content
-
... ... @@ -1,52 +1,164 @@ 1 - = Runningtheexamples=1 +{{toc maxLevel="1"}}{{/toc}} 2 2 3 - Applehas converted their WebObjects examplesin the Eclipseformat,but no documentationis providedon how to import them into Eclipse. The examples are in ///Developer/Examples/JavaWebObjects//.3 += ProjectBuilder and XCode = 4 4 5 - The first stepis:install Eclipse and WOLips:-) 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. 6 6 7 - SomeexamplesneedsDerby,an embedded Java database(OpenBase isnot includedwithWOanymore). Toinstallthe databases, you have to do:7 += Installing WebObjects and WOLips = 8 8 9 +1. h6. Download Golipse 10 +[[Golipse>>https://github.com/rebeld/Golipse]] will fetch the needed version of Eclipse, WOLips and other tools for WebObjects development. 11 +1. h6. Install the WebObjects 12 +The best way to install the WebObjects frameworks is according to [[these instructions>>WOL:Using WOLips With Multiple Versions of WebObjects]]. 13 +1. h6. Start Eclipse and switch to the WOLips perspective. 14 +1*. Under the //Window// menu, select //Open Perspective > Other...//. 15 +[[image:PerpectiveMenu.png]] 16 +1*. h6. Select //WOLips// and click //Ok//. 17 +[[image:PerspectiveChoices.png]] 18 + 19 +{{note title="WOLips Perspective"}} 20 +If you don't switch to the WOLips perspective, you won't be able to create new WebObjects projects. 21 +{{/note}} 22 + 23 +{{info title="Xcode & WebObjects"}} 24 + 25 +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. 26 +* Apple Developer Site (Free): [http://developer.apple.com/xcode/] 27 +* Mac OS X App Store ($4.99): [http://itunes.apple.com/us/app/xcode/id422352214] 28 + 29 +{{/info}} 30 + 31 +{{id value="javamonitor"}}{{/id}} 32 + 33 += Running Monitor and wotaskd on Mac OS X = 34 + 35 +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. 36 + 37 +Make sure //Web Sharing// is enabled in the //Sharing// panel in //System Preferences// (note: 10.5 comes with Apache 2.2 as the default). 38 + 39 +Edit ///etc/apache2/httpd.conf// (if you did a fresh install, you may already have these - search httpd.conf first) 40 + 41 +Search for rewrite//module, and above it, add this line~:// 42 + 9 9 {{code}} 10 10 11 -cd /Developer/Examples/JavaWebObjects/ 12 -sudo sh installDatabases.sh <yourusername> 45 +LoadModule WebObjects_module /System/Library/WebObjects/Adaptors/Apache2.2/mod_WebObjects.so 13 13 14 14 {{/code}} 15 15 16 - Now,youcan importthe examplesintoEclipse. StartEclipse, select //File// > //Import//,49 +Go to the very end and add: 17 17 18 - [[image:ImportMenu.png]]51 +{{code}} 19 19 20 - andselect//General// > //Existing Projects// intoWorkplace.53 +Include /System/Library/WebObjects/Adaptors/Apache2.2/apache.conf 21 21 22 - [[image:ImportGeneral.png]]55 +{{/code}} 23 23 24 - On thenext page, select//Select rootdirectory//andbrowse your disk to ///Developer/Examples/JavaWebObjects//.Youshould seea list of projects to import. Deselect the second//javaeoutil// project, or elseyouwon't be able toimport theprojects.57 +Search for "Directory /" and comment out the Order and Deny lines: 25 25 26 - [[image:ImportProjectsList.png]]59 +{{code}} 27 27 28 -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. 61 +<Directory /> 62 + Options FollowSymLinks 63 + AllowOverride None 64 + #Order deny,allow 65 + #Deny from all 66 +</Directory> 29 29 30 - [[image:PackageExplorer.png]]68 +{{/code}} 31 31 32 - Now, you need to fix the examples, becausethe build path is pointing to the source projectsof the WO frameworks, source that nobody outside Apple has access to :-)For eachproject, right-click on each project, select //Build Path// > //Configure Build Path...//70 +Restart apache 33 33 34 - [[image:BuildPathMenu.png]]72 +{{code}} 35 35 36 - Clickonthe //Projects// tab, select thereferencestothe WO frameworks that have the Warning icon and click //Remove//.74 +sudo apachectl graceful 37 37 38 - [[image:ConfigureBuildPath.png]]76 +{{/code}} 39 39 40 - Clickonthe//Libraries//tab,clickthe//Add Library//button. Select//WebObjectsFrameworks//andclick //Next//.78 +If you run //ps auxw grep httpd// you should see apache now running 41 41 42 -[[image:AddLibrary.png]] 80 +Create ///Library/LaunchDaemons/com.apple.webobjects.wotaskd.plist// with: 81 +(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) 43 43 44 - Click //System//,open the triangle next to //System// andmakesure 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//.83 +{{code}} 45 45 46 -After you corrected the build path on a project, the project will rebuild itself and the errors shoud dissapear. 85 +<?xml version="1.0" encoding="UTF-8"?> 86 +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 87 +<plist version="1.0"> 88 +<dict> 89 + <key>Disabled</key> 90 + <false/> 91 + <key>GroupName</key> 92 + <string>appserverusr</string> 93 + <key>Label</key> 94 + <string>com.apple.webobjects.wotaskd</string> 95 + <key>OnDemand</key> 96 + <false/> 97 + <key>Program</key> 98 + <string>/System/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd</string> 99 + <key>ProgramArguments</key> 100 + <array> 101 + <string>wotaskd</string> 102 + <string>-WOPort</string> 103 + <string>1085</string> 104 + </array> 105 + <key>ServiceIPC</key> 106 + <false/> 107 + <key>UserName</key> 108 + <string>appserver</string> 109 +</dict> 110 +</plist> 47 47 48 -/ /JavaBusinessLogic// and //RelatedLinks// requires Apache Derby, but the path toDerby's JAR is wrong. Remove the JAR from the buildpath, 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:112 +{{/code}} 49 49 50 -[[image:GoodDerbyPath.png]] 114 +Create ///Library/LaunchDaemons/com.apple.webobjects.womonitor.plist// with: 115 +(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) 51 51 52 -VoilĂ You finally can run the examples. 117 +{{code}} 118 + 119 +<?xml version="1.0" encoding="UTF-8"?> 120 +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 121 +<plist version="1.0"> 122 +<dict> 123 + <key>Disabled</key> 124 + <false/> 125 + <key>GroupName</key> 126 + <string>appserverusr</string> 127 + <key>Label</key> 128 + <string>com.apple.webobjects.womonitor</string> 129 + <key>OnDemand</key> 130 + <false/> 131 + <key>Program</key> 132 + <string>/System/Library/WebObjects/JavaApplications/JavaMonitor.woa/JavaMonitor</string> 133 + <key>ProgramArguments</key> 134 + <array> 135 + <string>JavaMonitor</string> 136 + <string>-WOPort</string> 137 + <string>56789</string> 138 + </array> 139 + <key>ServiceIPC</key> 140 + <false/> 141 + <key>UserName</key> 142 + <string>appserver</string> 143 +</dict> 144 +</plist> 145 + 146 +{{/code}} 147 + 148 +Start the launchd daemons : 149 +(you may need to sudo here) 150 + 151 +{{code}} 152 + 153 +launchctl load /Library/LaunchDaemons/com.apple.webobjects.wotaskd.plist 154 +launchctl load /Library/LaunchDaemons/com.apple.webobjects.womonitor.plist 155 + 156 +{{/code}} 157 + 158 +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: 159 + 160 +{{code}} 161 + 162 +http://localhost:56789 163 + 164 +{{/code}}