Update: Added some details of the build settings for converting an existing WebObjects Application project to a tidy servlet deployment package.

King, Josh and I spent the morning in the WebObjects lab trying to figure out a way to get Pachyderm deployed on non-MacOSX boxes under the new regime. We’ve now got a spanky new Tomcat-enabled build, that sucks in all of the supporting WebObjects, APOLLO, and Pachyderm jars into a single .war - topping 112MB of compiled goodness.

The good news is that it works, and seems to work well (once you have identified and addressed the mines laid in your path). The bad news is that form of deployment requires a valid WebObjects deployment license - which is no longer available separately from MacOSX Server 10.4 (for WO 5.3 at least - separate deployment licenses are still available for 5.2.4, but they are refused by apps compiled on 5.3)

A very helpful Apple engineer in the lab (who will remain nameless to protect him/her from any flak for going out on a limb to help us with this) was able to obtain a WO 5.3 deployment license string for us to test our Tomcat deployment. It looks like it worked perfectly. I had to delete the license so this engineer could keep their job, so I can’t test again, or on another platform at the moment.

One strategy we may have/get to adopt is to keep a WO 5.2.4 development system around, so that it can compile the .war SSD bundle with a 5.2.4 platform-agnostic deployment license - That’s plan B, though, since I’m really (futilely?) hoping that we can convince Apple to reconsider the MacOSX-only licensing. (I’m even 100% OK with non-MacOSX Server deployments being unsupported - just don’t make the app refuse to light up because of a license string!)

I’ll post a little write-up on the steps we had to take, and the build settings that need twiddling - and how they differ from the documented bits. That’s currently locked on my Powerbook, which is now a paperweight after sucking the life-sustaining juices from 2 separate batteries. I’ll plug it in when I get back to the hotel.

Oh, and to the person that IMed me to ask me about this - your timing was absolutely perfect! We were just getting to the solution when your IM came up. I’m very sorry that I was such a rude prick to you, but I didn’t want to be distracted right then, and we were using iChat to pass config files and data around.

Update: Here’s some info about the settings you need to tweak to have a project build as a nice tidy servlet doowackie.

First, you need to add JavaWOJSPServlet.framework to your project. That seems to automagically do some stuff to start building a .war file. Yay.

But, you also need to tell WebObjects more explicitly how you want your servlet compiled. These are the settings that worked for me. No warrantee, no guarantee, YMMV, IANAL, etc… If it borks something for you, well you probably should have backed up first…

WebObjects Servlet Build Settings

Replace the fuzzy part with your WebObjects deployment license (5.2.4 would be a good bet, if you’re still on it - otherwise, you may want to take a look in /System/Library/Frameworks/JavaWebObjects.framework/Resources/ for some random ASCII that might do the trick - just be sure to abide by the EULA, and don’t break your license agreement. I’m only mentioning this so you can test on your own machine, and replace the license with one you purchase for deployment), and replace the SERVLET_WEBAPPS_DIR with the path to the directory you want to build this sucker. I just built into a quick/fresh download of Tomcat 3.3.2, still living in my ~/Downloads directory. Not likely the final deployment directory, but you get the idea. Also, this could be any directory you like. It’s just the build location - it doesn’t talk to the Tomcat installation or anything.

In my case, this built a directory that contained 112MB of our code, as well as the Entire WebObjects System, and any other dependent .jars.

Update the second: On a lark, I thought I’d try deploying under Tomcat 5.5.9 - the latest build. Out of the .tar, it requires java 1.5, so until you install the 1.4 compatability stuff it’s no joy on MacOSX. But adding the compatability stuff is trivial. But, it still doesn’t get my app deployed - as expected, Tomcat 5.x appears to have difficulty hosting a WebObjects application servlet, since it’s supporing a newer rev. of the servlet spec (2.4, IIRC), when WO spits out servlets matching version 2.2 of the servlet spec. Not a critical thing at this point. Just gathering data points for discussions with the PHBs.

17 Responses to “WebObjects Deployment and Servlet Single Directory”
  1. D–

    You and your “boys” (King & Josh) are smart … scary smart. Oh and you guys know how to enjoy your wine as well! I’m back east — still sick, but much better informed about pert near everything Mac and Macromedia. Safe travels! C

  2. You missed supper last night - I apparently enjoy my wine best when I dump it into my lap - I’d only had a couple sips, so it wasn’t the wine that did it… Made for an interesting walk back to the hotel :-)

    I’m just glad that it looks like we have a strategy to deploy. It was pert’ near game over for a while there. boy, howdy. I tell you what.

  3. As someone who can’t attend WWDC this year and is interested in WO 5.3 deployment on
    other platforms:

    Why would this be illegal / contrary to the EULA ?

    If I read the WO mailing list correctly an Apple VP stated they don’t care if people run WO 5.3 - I guess as long as they buy a copy of OS X Server for each deployed copy - on other systems but that it’s unsupported…

    http://lists.apple.com/archives/webobjects-dev/2005/Jun/msg00143.html

    Or did I misunderstand this post ?

  4. I was referring to the acquisition/use of the license key. They’re only officially available as part of MacOSX Server 10.4 now. Since you can’t buy a separate deployment license, this becomes a licensing issue.

    So, yeah. If you can buy a copy of MacOSX Server 10.4 and rip the serial number out of that, then you should be fine.

  5. I was just trying to get the point across that I am _not_ recommending people rip their 5.3 license from their MacOSX dev. box to use the key on another platform for deployment. Only that this method would provide you with the key to test building and deployment on your dev. box.

  6. Thanks for the update.

    As far as I understood from reading the WO mailing list, WO 5.3 Deployment isn’t available yet so I don’t know if this will work and the number can be found easily on 10.4 server.

    But people on the WO mailing list suggested this should possible (and that the key doesn’t check the platform).

    Anyway, I e-mailed the people I know who attend WWDC to get back to Apple in the feedback session so that at least *deployment* is possible…this is stupid.

  7. Yeah. I asked in the Q&A of one of the WebObjects session. I can’t really talk about the session here, but it led me to the servlet deployment strategy.

  8. Something the WO documentation doesn’t [yet] cover [is XCode ;-)], but you may have tried - does 5.3 deployment still work with apps developed in 5.2.x? I would have thought so but am running a Panther server - didn’t want to put a Tiger in my tank until I know I’m not about to break something :-)

  9. I believe that as long as you don’t use the new 5.3 features, you should be ok. I haven’t tested it, but it should Just Work™

    Just don’t use the new java collections stuff, and whatever else they added in, and you might be OK. Test it first, though…

    I do know that you can compile under 5.3 and deploy on 5.2 (our server is still a Panther server as well), but I can’t verify just how well the app runs - it runs, but is there something scary waiting to happen?

  10. Cool - may as well give it a go then…I wouldn’t be worth paying if I didn’t live on the edge every so often ;-) I suppose everything should Just Work until a version of WebObjects that requires Java [2] [1.]5 rolls along.

  11. A bit off-topic, but the educational version of WebObjects used to include a deployment license key. Any information if this is still the case?

  12. Well… The educational license was for 5.2. It’s not needed for 5.3, as long as you’re using MacOSX to develop, and MacOSX Server for deployment. Licenses aren’t available separately from the dev. tools or MacOSX Server.

  13. Deployment update for 5.3 is out and the included license key will NOT allow you to deploy on non Darwin platforms.

  14. check_writer says:

    So……. i’m a little confused here. I just need a simple answer here. If i have Tomcat 5.5.12, Redhat Linux on Intel, and a WO 5.3 deployment license aquired by my OSX Tiger Server unlimited.

    Can I deploy my WO application?

  15. check_writer: Technically, yes. Legally, I think so. Likely, assuming you’re not _using_ the WO deployment license on the Tiger server…

  16. check_writer says:

    thanks and forgive me for asking,so is there a step by step “how-to” deploy webobjects on tomcat, or even for Tomcat on linux?

    I’m new to webobjects deployment, but have grown to really love it, however i’m feel pretty standed not beign able to find help with how to deploy the thing on linux.

    any help would be appreciated.

  17. check_writer: this is the closest I’ve seen to a “howto” for WO + Tomcat. There is likely something else out there, but I haven’t come across it yet…

Leave a Reply

Readers who viewed this page, also viewed:

  • N/A
Creative Commons License
This work is licensed under a Creative Commons Attribution 2.5 Canada License.