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
on 2007/11/27 22:25
Change comment:
There is no comment for this version
To version 27.1
edited by kiberkli
on 2011/07/27 14:05
on 2011/07/27 14:05
Change comment:
Changed link to Golipse to the actual application, not the source. Added link to the source.
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. probert1 +XWiki.kiberkli - Content
-
... ... @@ -1,34 +1,169 @@ 1 - Apple has converted their WebObjectsexamples in the Eclipse format, but no documentation is provided on howtoimport them into Eclipse.1 +{{toc maxLevel="1"}}{{/toc}} 2 2 3 - Theexamples arein/Developer/Examples/JavaWebObjects3 += ProjectBuilder and XCode = 4 4 5 - Some examplesneedsApache Derby,anembedded Javadatabase(OpenBaseisnot includedwithWOanymore).To installthe databases,you havetodo: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 += Installing WebObjects and WOLips = 8 + 9 +1. h6. Download Golipse 10 +[[Golipse>>http://cloud.github.com/downloads/rebeld/Golipse/Golipse.app_build_9.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 ($4.99): [http://itunes.apple.com/us/app/xcode/id422352214] 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 + 7 7 {{code}} 8 8 9 -cd /Developer/Examples/JavaWebObjects/ 10 -sudo sh installDatabases.sh <yourusername> 50 +LoadModule WebObjects_module /System/Library/WebObjects/Adaptors/Apache2.2/mod_WebObjects.so 11 11 12 12 {{/code}} 13 13 14 - Now,youcan importthe examples into Eclipse. StartEclipse, select File -> Import, andselect General -> ExistingProjects into Workplace.54 +Go to the very end and add: 15 15 16 - On the next page, select Select rootdirectory 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.56 +{{code}} 17 17 18 - You shouldseethe projectsintheWO Package Explorer. Ifyou see the projectsin Package Explorer (without the WO), that means that you are using theJavaperpective instead of theWOLips perpective.58 +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 outsideApple has access to :-)60 +{{/code}} 21 21 22 - Foreachproject,right-clickoneachproject,selectBuild Path-> ConfigureBuildPath...62 +Search for "Directory /" and comment out the Order and Deny lines: 23 23 24 - Clickon the Projects tab, select the references to the WO frameworks andclick Remove64 +{{code}} 25 25 26 -Click on the Libraries tab, click the Add Library button 66 +<Directory /> 67 + Options FollowSymLinks 68 + AllowOverride None 69 + #Order deny,allow 70 + #Deny from all 71 +</Directory> 27 27 28 - Select WebObjects Frameworks andclick Next73 +{{/code}} 29 29 30 - Click System, open the triangle next to Systemand make surethatJavaEOAccess, JavaEOControl, JavaFoundation, JavaWebObjects, JavaWOExtensions and JavaXML are selected. For the SchoolToolsClient, you also need to add the JavaWebServicesSupportand JavaWebServicesClient. For theSchoolToolsServer, you also need to add the JavaWebServicesSupport.75 +Restart apache 31 31 32 - After youcorrectedthebuild path, the project will rebuild itself and the errors shoud dissapear77 +{{code}} 33 33 34 -You also have to fix the build path for JavaBusinessLogic and RelatedLinks because the Derby path is incorrect. 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}}