You're extending ActionSupport, right? I'm also wondering if there's anything else on the value stack. Are you using an <s:action...> tag?
Dave --- On Tue, 9/9/08, Mark <[EMAIL PROTECTED]> wrote: > From: Mark <[EMAIL PROTECTED]> > Subject: Re: NullPointerException with Validation Messages > To: "Struts Users Mailing List" <[email protected]> > Date: Tuesday, September 9, 2008, 7:32 PM > I changed <div id="login"> to <div > id="loginContainer">, refreshed, > and I still get the NPE :-( > > If this help, I've also run into another problem which > is related. > If I implement the Validatable interface in my action, and > then add a > Field error (ie. addFieldError("userName", > "requiredString");) in the > validate method, the message displayed is incomplete. It > will > display "is required" instead of "User Name > is required". Note that > requiredString has ${getText(fieldName)} - the getText > isn't > returning the text. When I look in the logs, there is a > warning > message (not a NPE) stating that I'm looking for a > message key that > is null. I don't have the code currently setup to > reproduce this > problem, but I can if you'd like to see the exact > warning message. I > think they are related because they both are producing a > null message > key. Let me know what you think. > > Thanks, > Mark > > > On 10/09/2008, at 9:17 AM, Dave Newton wrote: > > > Here's something to try, although I still > can't get the NPE, which > > is irritating and scary: > > > > Your <s:form>'s action is "login", > which means the DOM's <form ...> > > id will also be "login". Because the markup > is arguably somewhat > > brittle, your <div id="login"> element > is colliding with the <form>. > > > > Try changing the <div> id to something like > "loginContainer" or > > whatever and see what that does. > > > > Dave > > > > --- On Tue, 9/9/08, Dave Newton wrote: > >> --- On Tue, 9/9/08, Mark wrote: > >>> Thank you for the suggestion. Yes, I have and > it > >>> still produces the NullPointerException. > >> > >> You may want to try putting the complete webapp up > >> somewhere, or post a minimal, but complete, source > example > >> on something like pastebin/etc. I tried several > different > >> things to try to get the NPE but couldn't. > > > > > > > --------------------------------------------------------------------- > > 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

