This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
To a large extent, I like developing web applications within the Struts framework. However, one arena of the framework that I think could use some serious attention is that of displaying meaninful error messages when something is amiss. Many times, I've made some small mistake, like name a form parameter incorrectly, and instead of a meaningful error message being displayed - or even any error message at all - the page simply doesn't render, a web browser displays a blank page, no error messages appear to the console, and nothing gets logged. (I do develop with the logging level set to debug.) Luckily, I develop with very small baby steps, and I can spot most small errors in just a few seconds - even without some nice error messages. But, two days ago, I spent three hours wondering why my form wasn't displaying, only to finally realize that I hadn't specified a form in the formset of the form-validation of my validator rules configuration. Of course, there were no error messages anywhere that might have helped point out this mistake two hours and fifty-nine minutes before I finally discovered it - all I was seeing was a blank page where my form was supposed to appear. I'm hoping that there exists a tool that will validate a Struts configuration. Anybody know of one? Or does anybody have any ideas for getting some (meaningful) error messages out of Struts? [ April 25, 2004: Message edited by: Dirk Schreckmann ]
Just bumping this old thread, since this forum is busy this week.
It does occur to me, now, that I could have been using a visual Struts development tool that would have likely made my above example mistake obvious. That said, I know I've run into other more obscure problems that a visual development tool might not catch.
Also, I suppose that even a debugger could help at times.
Any other general or specific ideas? [ July 28, 2004: Message edited by: Dirk Schreckmann ]
Dirk, I use WSAD which catches some stuff (like the one in your example.) However, I still get vague error messages often. Like you, I develop in tiny steps and know that the error is the last thing I did.
I'm going to watch this thread closely to see what other people come up with! Thanks for bumping it.