Vita Rara: A Life Uncommon

The More I Use Struts 2 the More I Like It


It's a quiet Saturday and I'm working. Yea, I know some people would scoff at that, but lately my office and business life during the week are so hectic I can't get into that "place" where development just flows.

Well, today I'm the only one in the office and I'm getting development done. I'm tackling a very tricky screen in Quadran, and Struts 2 is making it a joy. The more I use Struts 2 I realize that a lot of development and thought has gone into solving real web developer needs. When I think of some new feature I'd like in Struts 2 I frequently find that it's already there.

I've started using the "method" property on submit buttons. I know I'm late to the party. This is just so neat. I used to use hidden properties and switches to get to the right logic. Now, just set method on the <s:submit> tag, and voila! I'm in the right place in my action.

I tried this some time ago, but it is my recollection that it by default always called the same prepare() and validate() method. Now, it will call prepare{methodName}() and validate{methodName}(). This makes creating multi-step workflows sooooo easy.

To all of the Struts 2 and XWork 2 developers here's a big thanks. I will be at ApacheCon in November, the first beer is on me.