You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Alex McLintock <al...@OWAL.co.uk> on 2003/02/28 18:54:03 UTC
action form error messages
Hi folks,
I am using traditional action forms rather than DynaActionForms and when I
get it slightly wrong (eg by missing out get/set methods) I get the
following error
No getter method for property seriesnumber of bean
org.apache.struts.taglib.html.BEAN
Why is it telling me the problem is within the class
org.apache.struts.taglib.html.BEAN and not within my ActionForm.
Cheers.
Alex
Available for java/perl/C++/web development in London, UK or nearby.
Apache FOP, Cocoon, Turbine, Struts,XSL:FO, XML, Tomcat, JSP
http://www.OWAL.co.uk/
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Action Mapping path vs parameter
Posted by Mark <st...@webpit.com>.
There appears to be a one to one relationship with regards to the path and parameter values in <action> mappings. Is there any particular reason why one
would use both of these instead of just the path to determine the correct course of action?
Regards,
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: action form error messages
Posted by Mark <st...@webpit.com>.
Because by default,
the <html:form name
parameter is set to org.apache.struts.taglib.html.BEAN
which also defaults to your bean. You could alternatively name your form bean in the html:form element
Regards,
Mark
*********** REPLY SEPARATOR ***********
On 02/28/2003 at 5:54 PM Alex McLintock wrote:
>Hi folks,
>
>I am using traditional action forms rather than DynaActionForms and when I
>get it slightly wrong (eg by missing out get/set methods) I get the
>following error
>
>No getter method for property seriesnumber of bean
>org.apache.struts.taglib.html.BEAN
>
>Why is it telling me the problem is within the class
>org.apache.struts.taglib.html.BEAN and not within my ActionForm.
>
>Cheers.
>
>Alex
>
>
>Available for java/perl/C++/web development in London, UK or nearby.
>Apache FOP, Cocoon, Turbine, Struts,XSL:FO, XML, Tomcat, JSP
>http://www.OWAL.co.uk/
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: action form error messages
Posted by Dennis Muhlestein <de...@zserve.com>.
Because it doesn't matter what the name of your bean is. Stuts always
sets it as an attribute in your selected scope. The name of that
attribute happens to be org.apache.struts.taglib.html.BEAN.
if you were to call getClass() on that bean, you would see your class.
<disclaimer>
I think that is right but might be completely and 100% incorrect
</disclaimer>
-dennis
On Fri, 2003-02-28 at 10:54, Alex McLintock wrote:
> Hi folks,
>
> I am using traditional action forms rather than DynaActionForms and when I
> get it slightly wrong (eg by missing out get/set methods) I get the
> following error
>
> No getter method for property seriesnumber of bean
> org.apache.struts.taglib.html.BEAN
>
> Why is it telling me the problem is within the class
> org.apache.struts.taglib.html.BEAN and not within my ActionForm.
>
> Cheers.
>
> Alex
>
>
> Available for java/perl/C++/web development in London, UK or nearby.
> Apache FOP, Cocoon, Turbine, Struts,XSL:FO, XML, Tomcat, JSP
> http://www.OWAL.co.uk/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: action form error messages
Posted by James Mitchell <jm...@apache.org>.
That's not a class, it's a value setup within the framework to store
beans in the request/session/whatever you told it to.
(Specifically, it is in org.apache.struts.taglib.html.Constants)
...
...
/**
* The name of this package.
*/
public static final String Package =
"org.apache.struts.taglib.html";
/**
* The attribute key for the bean our form is related to.
*/
public static final String BEAN_KEY = Package + ".BEAN";
...
...
It might seem non-intuitive to some people to see what looks like a
class, but it is the best thing to help you debug your pages and not
step on one of your attributes since you can (for some tags) specify any
value you want.
Imagine you have an application that sets 5 beans with 15 fields each in
the request under various keys, one of which is called "customerBean".
Let's assume that for some reason you mispelled it on your jsp page as
"customerBaen".
So you have this.
<bean:write name="customerBaen" property="address"/>
When you go to this page you get a big stack trace in your face. Now,
how do you know where to look? What caused it? With 5 beans (75
fields) to display, all struts knows is that you wanted a bean called
'customerBaen' and it wasn't there.
Struts has no idea that it was a
com.mycompany.struts.framework.customer.view.AuthorizedCustomer so it
simple tells you it 'couldn't find bean customerBaen under any scope'.
AHA!!! That's it!! I just search my jsp for 'customerBaen', fix the
typo and I'm back up and running.
The problem is that the Struts taglibs are so friendly, that it is a bit
confusing to people who are new to the framework. I should know, I
hated trying to figure out that damn message when I first started...LOL!
Good luck!!
--
James Mitchell
Web Developer/Struts Evangelist
http://jakarta.apache.org/struts/
> -----Original Message-----
> From: Alex McLintock [mailto:alex@OWAL.co.uk]
> Sent: Friday, February 28, 2003 12:54 PM
> To: struts-user@jakarta.apache.org
> Subject: action form error messages
>
>
> Hi folks,
>
> I am using traditional action forms rather than
> DynaActionForms and when I
> get it slightly wrong (eg by missing out get/set methods) I get the
> following error
>
> No getter method for property seriesnumber of bean
> org.apache.struts.taglib.html.BEAN
>
> Why is it telling me the problem is within the class
> org.apache.struts.taglib.html.BEAN and not within my ActionForm.
>
> Cheers.
>
> Alex
>
>
> Available for java/perl/C++/web development in London, UK or nearby.
> Apache FOP, Cocoon, Turbine, Struts,XSL:FO, XML, Tomcat, JSP
> http://www.OWAL.co.uk/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org