WebWork and steep learning curves

After developing Java applications for years, I’m starting my first ever web application, and I’m not having a good time. I chose WebWork because I like Hani Suleiman’s attitude and WebWork looks cool. I started learning WebWork yesterday, and so far it’s been practically nothing but fighting.

First, I couldn’t get WebWork to run at all, which it turns out was because Velocity was trying to write to /root/avalon.log or something, which it obviously wouldn’t have permission to do, since it’s not root. It’s beside the point that root’s home folder is a ridiculous place to save a log file. Anyway, instead of logging to some kind of standard logging system, Velocity just threw an exception and gave up. I fixed this by turning off Velocity logging.

Second, I couldn’t get validation to work, which it turns out was because WebWork 2.1.1 was shipped with a broken version of XWork, which can’t load validators. I fixed this by downloading XWork 1.0.3, and replacing the jar file in the WEB-INF/lib folder.

Now, I can’t call methods on actions from within JSP. The method in my action is being called, and it is returning a value, but somehow that value doesn’t find its way back to the JSP. I’ve tried about five different ways and syntaxes now, which I’ve found from the documentation and Freenode #webwork and the webwork-dev mailing list, and none of them work.

None of this is helped by the fact that in many cases, WebWork doesn’t throw exceptions that it encounters, it just logs them, or throws an empty RuntimeException and doesn’t use exception chaining.

It’s been 27 hours, minus 8 hours sleeping, minus 2 hours eating, so a total of 17 hours, and I still can’t get a demo page working. I only hope the learning curve is steep and quick, and it won’t be this hard the whole way through.

7 Responses to “WebWork and steep learning curves”

  1. Not Hani Says:

    I think you’ll find Hani is involved in Webwork 1.3, not WW2 (which is a total, incompatible rewrite).

  2. Patrick Lightbody Says:

    Not Hani: WebWork 2.x is not imcompatible with 1.x, and it is not a rewrite either. In fact, more code is similar than different.

    As for the issues mentioned here. I’m sorry about the whole XWork 1.0.3 mess. We’ll get a new release out soon that will fix that. About the logging error, I have no idea why Avalon is involved there. Not really something we can fix for you.

    I’m not sure why the returned value from a method call isn’t displaying. It most certainly should. I think you’ve been posting to the list so I’ll try to help out there.

  3. Eddy Young Says:

    Tried using Struts. Didn’t like it. Tried using WebWork. Didn’t seem like worthwhile to spend so much time learning it. Then, I thought, why not follow the standard. It is the result of a “think tank” and should be well documented and easy to learn. So, I chose JSF. Sun’s tutorials seem to concentrate on Sun’s reference implementation of J2EE 1.4 so that with any other implementation it would be difficult. Then, I found MyEclipse short tutorial (search “JSF Login Demo MyEclipse”) and was converted. I learned the basics of JSF in less than an hour. Give it a try and you will be surprised!

  4. Anonymous Says:

    You are doing a wonderful thing here on the Internet. I wish you the very best. Kindest regards.

  5. online poker Says:

    Nice! We rather appreciated the website

  6. flowers Says:

    I see we share a common interest! Excellent job on the website!

  7. haribabu Says:

    asdfasfdasf

Leave a Reply