Doh! Answered my own question:

The page/form in question is using a combination of custom (i.e. using
the validate method) and Validator validation, and one of the message
keys in my own validate method was incorrect (i.e. The method was
looking for a key that didn't exist).

Cheers...

Dave

-----Original Message-----
From: Davide Bruzzone 
Sent: Tuesday, September 30, 2003 6:50 PM
To: Struts Users Mailing List
Subject: Validator problem: html:messages tag and NullPointerException


Hello...

I'm using the Struts Validator, and have come across some strange
behavior:

On only one of the pages that uses the Validator (Not all of them...
Some of the pages that use the Validator work fine, which makes the
problem even more confusing), the following code causes a
NullPointerException...

<html:messages id="error">
        <li class="error"><bean:write name="error"/></li>
</html:messages>

Here's the exception:

java.lang.NullPointerException
        at java.util.Hashtable.put(Hashtable.java:389)
        at
org.apache.jasper.runtime.PageContextImpl.setAttribute(PageContextImpl.j
ava:229)
        at
org.apache.struts.taglib.html.MessagesTag.doAfterBody(MessagesTag.java:3
15)
        at
org.apache.jsp.programPurchase$jsp._jspService(programPurchase$jsp.java:
278)
        ...

My research so far has turned up a posting that suggests that the
problem has been fixed in Struts RC1 (which I am already using). Again,
what's strange about this is that it only happens on one of the pages
that uses the Validator. The other pages that use the Validator work
fine.

Has anyone seen this problem by any chance? Does anyone have any
suggestions regarding which rock(s) I should look under? Any suggestions
would be greatly appreciated...

TIA

Dave Bruzzone

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to