Make sure the form is defined correctly in struts-config.xml.
-Nimmi
-----Original Message-----
From: Firmin David [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 08, 2001 7:43 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Help! Can't access ActionForm properties in Action
perform()!
Thanks, but sadly, that wasn't the problem, and I still haven't figured it
out...
The exception is being thrown from the Action's perform() method, meaning
validation in the bean is successful, and therefore all the field names
match up. For some reason when I reference the formbean in the action
(having casted it: MyForm thisForm = (MyForm) form; ) the bean itself is
null.
I don't know why.
Further suggestions gratefully received!
Rgds
David
-----Original Message-----
From: Dorai, Harish (c) [mailto:[EMAIL PROTECTED]]
Sent: 08 March 2001 13:29
To: '[EMAIL PROTECTED]'
Subject: RE: Help! Can't access ActionForm properties in Action
perform()!
I also got a similar exception, and for me the reason was that I had
different form field name and bean property name. Make sure that the form
that you are submitting have the field names same as the ActionForm bean's
properties.
-----Original Message-----
From: Firmin David [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 08, 2001 7:53 AM
To: '[EMAIL PROTECTED]'
Subject: Help! Can't access ActionForm properties in Action perform()!
Hi all
I've done something stupid. I know I have, but I can't figure out what....
I'm trying to access the data entered by the user from the corresponding
formbean in my action's perform method (really rudimentary stuff, I know),
and I keep getting null pointers.
I've followed exactly what was done in the example app:
perform(blah blah, ActionForm form, etc.etc.){
MyForm thisForm = (MyForm) form;
thisForm.getSomething();
}
but my getSomething() gets nothing, and all I get is a null pointer
exception, because thisForm == null.
I'm fairly sure I've rooted through the documentation, but can't find much
in the way of help.
Anyone got any idea what I've overlooked? I know everything is mapped right,
as the input is validated successfully in the formbean, and the correct
action is called.
Thanks in advance
Rgds
David
************************************************************************
The information in this email is confidential and is intended solely
for the addressee(s).
Access to this email by anyone else is unauthorised. If you are not
an intended recipient, you must not read, use or disseminate the
information contained in the email.
Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of
The Capital Markets Company.
http://www.capco.com
***********************************************************************
************************************************************************
The information in this email is confidential and is intended solely
for the addressee(s).
Access to this email by anyone else is unauthorised. If you are not
an intended recipient, you must not read, use or disseminate the
information contained in the email.
Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of
The Capital Markets Company.
http://www.capco.com
***********************************************************************