Frank,
I agree very much! Error messages that have a unique
cause point you towards the solution are much better
than things like
'can't find x in scope null'.
It takes time to add this stuff to code. An
alternative is for us users to set up a faq list or a
common errors suggested solutions database. I'm not
volunteering, I'm only an occasional struts user -
hoping to use it more though.
Keith.
--- Frank Lawlor [EMAIL PROTECTED] wrote:
I noticed lots of people having struts problems with
this
symptom.
From what I have seen of the struts startup, many
startup
problems will cause this to be the first symptom for
the
example app. This kind of one error for all
situations
makes diagnosis difficult.
Looking in the log may clarify the problem, but I
noticed
that some of the problems do not produce obvious log
entries (errors are swallowed).
I have some suggestions that struts (and web apps
generally) can use to help make it easier to debug
installation and other similar startup problems.
1) Don't just swallow errors without a clear error
log
entry. E.g.,
getServletContext().getResourceAsStream(config)
just swallows security exceptions. Not good. It
does return
a null, but this is not enough to identify the
problem.
2) keep some type of structure in which some
meaningful
message can be sent to the application interface.
For example,
initialization and other code can put some
indication of the
problem in an Errors structure. When the user
makes a
query the application (or struts infrastructure) can
check to
see if Errors is non-empty and display a special
error
page which will provide better help in diagnosing
the problem.
3) install and config problems can be more easily
diagnosed
by explicitly checking for necessary pre-conditions
(e.g.,
file access, network access, etc.) and generating
specific
errors. This could be run separately or optionally
as part
of init.
Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm
integrating technology
strategy and software solutions.
--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
__
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]