Upgrading Equinox to WebWork 2.2.1
In addition to upgrading Tapestry last week, I also upgraded Equinox to WebWork 2.2.1 (from 2.1.5). The commit log can be found on Fisheye. The changes I had to make were pretty minor:
- WebWork 2.2.1 easily integrates with Spring - you just need to add
webwork.objectFactory=spring
to your webwork.properties file. This isn't a whole lot different from 2.1.5, except that you can get rid of the SpringObjectFactoryListener from web.xml. - ServletDispatcher has been deprecated in favor of FilterDispatcher - which should map to <url-pattern>/*</url-pattern>. Using a filter for the controller is an obvious improvement, and it's pretty slick how WebWork can now add CSS and JavaScript to your pages on-the-fly.
- WebWork now has a <ww:datepicker> component which makes it possible to do easily do popup calendars like you can with Tapestry and JSF. Unfortunately, it seems you still can't set a global date format using a ResourceBundle.
- AltSyntax is on my default, which means you'll need to change "'literal string'" to "literal string" and "variable" to "%{variable}". This is much easier to read and a welcome change. It's unfortunate that ${} can't be used, but that's JSP's fault, not WebWork's.
- FreeMarker is required, even if you're just using JSP. This is because the JSP tags' HTML is generated using FreeMarker templates (I think).
- The taglib URI has changed from "webwork" to "/webwork". I wonder why they don't use the full URL like most tag libraries?
- Exception mappings have been added so you can easily map a particular exception to a specific view. This allowed me to remove a custom interceptor I'd previously wrote.
- The DTD for xwork.xml has changed from xwork-1.0.dtd to xwork-1.1.1.dtd.
- The only issues I found were that the validator interceptor makes it difficult to override "excludeMethods" and client-side validation renders duplicate messages when you click submit multiple times.
- When I deployed the latest Equinox demo to Contegix, we had some issues with the stylesheet the datepicker stuffs in the <head>. Basically, mod_caucho 3.0.14 wasn't returning the proper content-type for the stylesheet (even though it was for the rest). Upgrading to Resin 3.0.17 with mod_proxy fixed the problem.
Hopefully this helps you upgrade to WebWork 2.2.1.
Posted by Meghana Patil on April 29, 2006 at 11:47 AM MDT #
Posted by Matt Raible on April 29, 2006 at 04:00 PM MDT #