You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Davide Bruzzone <Da...@ngt.com> on 2003/10/01 02:50:13 UTC

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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org