With the kind help of a guy named Josh on Tribe.net, I have greatly improved my Struts project. I was doing my own hokey stuff to handle login, and he suggested that I use the Tomcat container managed security. With very minor changes, I was able to use my existing database tables to get the login stuff working. Even better, now Tomcat handles redirecting a user to their original URL after shunting them off to the login page. All to the good, that’s one less thing for me to manage.
With that, and finally figuring out a decent way to handle multi-valued controls (summary: anything that is multivalued has a String array as the underlying data, and make all the values textual. If what I am doing represents a matrix of checkboxes, I make the name of each be the same and the value be the concatenation of “row,column”. When my Struts Action and Form deal with it, I split it on the concatenation character and continue forth. It’s a little hokey, but since HTTP parameters are textual anyway, its as good as anything else I looked at. After a few more infrastructural days, I think I know about everything I need to proceed. Now it is just grinding away on the list of functionality. Everything from here on out should be straightforward enough.
As I was beginning this, I opted to purchase the Wiley book Mastering Jakarta Struts by James Goodwill. I wondered at the time if maybe I shouldn’t have bought the Manning book by Ted Husted, Struts in Action. The answer is yes, I should have. Sitting down with that book for 15 minutes in Borders after seeing The Matrix answered all my lingering questions from the last few days. I’m going to be buying the Husted the first time I can get my spouse and her Northwestern staff discount into the Borders with me.