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.