You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Craig R. McClanahan" <Cr...@eng.sun.com> on 2001/01/25 20:22:17 UTC

Re: no 'application' init parameter for ActionServlet causes NullPoin terException in ??

perry.tew@cibavision.Novartis.com wrote:

> Martin,
>     Thanks for the response.  That's sort of the same conclusion I came to.
> If that's the way it needs to be, that's fine.  I like the design of the
> resource file.   I just skipped it in the interest of getting my first
> example working with as little as possible.
>
> Craig & Company:  Prehaps it would be possible to modify the documentation
> in such a way as to better explain this requirement?  I was thrown off by
> the description in the javadoc.  It would also be cool if the ErrorsTag.java
> source checked for a null messages object and threw a more descriptive error
> message stating that an application parameter is required, or something.
> Just a thought.
>

I've updated the 1.0 version of this tag (<html:errors/>), which you should be
using instead of <struts:errors/> in new development, to display "MISSING
APPLICATION RESOURCES" when this happens.  It had appropriate checks for null
values, and would completely ignore the ActionErrors object passed by your
application if there were no resources available.

This will show up in tonight's nightly build.

> Again, thanks for the excellent tool.  I'm really excited about using it.
>
> Perry Tew
>

Craig