permaculture playing cards
The moose likes Struts and the fly likes Struts Frustration - No Error Messages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Frustration - No Error Messages" Watch "Struts Frustration - No Error Messages" New topic

Struts Frustration - No Error Messages

Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
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 ]

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
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 ]
Surasak Leenapongpanit
Ranch Hand

Joined: May 10, 2002
Posts: 341
I edit struts-config file with Struts Console. If there is a problem, it show me the line of text that is having a problem.
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33130

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.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
John Carnell
Ranch Hand

Joined: Sep 27, 2002
Posts: 71
Hi Dirk,

My vote is for WSAD. They have some of the nicest Struts tools I have seen to date.


John Carnell<br />Principal Architect<br /> <br />Netchange, LLC<br />1161 HillCrest Heights<br />Green Bay, WI 54313<br /> <br /><br /> <br /> <br />Author of <a href="" target="_blank" rel="nofollow">Pro Jakarta Struts, Second Edition</a>
I agree. Here's the link:
subject: Struts Frustration - No Error Messages
It's not a secret anymore!