You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Robert D. Morse" <rm...@mdesignz.com> on 2002/02/19 05:28:05 UTC

RE: Null Pointer Exception with Validator MessagesTag.java:253 -- Nevermind

Never mind.  A typo in my ApplicationResources.properties files was
preventing it from finding the 'errors.required' message.  Perhaps a log
message to indicate that a specified message could not be located in
addition to the exception would help track this down.

-----Original Message-----
From: Robert D. Morse [mailto:rmorse@mdesignz.com]
Sent: Monday, February 18, 2002 1:38 PM
To: Struts Users Mailing List
Subject: Null Pointer Exception with Validator MessagesTag.java:253


I'm integrating the validator into an existing Struts application.  The
validation works properly (i.e., it checks for proper of length, content,
etc., of fields that I specify), however, when it comes to printing the
messages to the user, I get a NPE in MessagesTag.doStartTag:253
(pageContext.setAttribute(id, msg)).

In my jsp file I have:

<logic:messagesPresent>
	<bean:message key="errors.header"/>
	<html:messages id="error">
		<li><bean:write name="error"/></li>
	</html:messages>
</logic:messagesPresent>

I know that the <logic:messagesPresent> works properly because everthing is
fine when the page first displays.  It's obvious to me that it's with the
'id="error"', but quite frankly, I'm not sure what it should be or how to
fix it.  Thanks.


-------------------------------------------
Robert D. Morse
rmorse@mdesignz.com
PGP Key:  D9C4AA6A
PGP Finger Print:  ED56 DEEA 95CF AC99 C2B0  77D4 7D92 ACCA D9C4 AA6A


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Null Pointer Exception with Validator MessagesTag.java:253 -- Nevermind

Posted by Keith <ke...@yahoo.com>.
I'm surprised it doesn't give a better message.
You're not the 1st to wish for this!.

--- "Robert D. Morse" <rm...@mdesignz.com> wrote:
> Never mind.  A typo in my ApplicationResources.properties files was
> preventing it from finding the 'errors.required' message.  Perhaps a log
> message to indicate that a specified message could not be located in
> addition to the exception would help track this down.
> 
> -----Original Message-----
> From: Robert D. Morse [mailto:rmorse@mdesignz.com]
> Sent: Monday, February 18, 2002 1:38 PM
> To: Struts Users Mailing List
> Subject: Null Pointer Exception with Validator MessagesTag.java:253
> 
> 
> I'm integrating the validator into an existing Struts application.  The
> validation works properly (i.e., it checks for proper of length, content,
> etc., of fields that I specify), however, when it comes to printing the
> messages to the user, I get a NPE in MessagesTag.doStartTag:253
> (pageContext.setAttribute(id, msg)).
> 
> In my jsp file I have:
> 
> <logic:messagesPresent>
> 	<bean:message key="errors.header"/>
> 	<html:messages id="error">
> 		<li><bean:write name="error"/></li>
> 	</html:messages>
> </logic:messagesPresent>
> 
> I know that the <logic:messagesPresent> works properly because everthing is
> fine when the page first displays.  It's obvious to me that it's with the
> 'id="error"', but quite frankly, I'm not sure what it should be or how to
> fix it.  Thanks.
> 
> 
> -------------------------------------------
> Robert D. Morse
> rmorse@mdesignz.com
> PGP Key:  D9C4AA6A
> PGP Finger Print:  ED56 DEEA 95CF AC99 C2B0  77D4 7D92 ACCA D9C4 AA6A
> 
> 
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>