You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2003/11/03 15:41:51 UTC
DO NOT REPLY [Bug 24356] New: -
"Cannot retrieve definition for form bean null" warning too late and not precise or unnecessary altogether?
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24356>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24356
"Cannot retrieve definition for form bean null" warning too late and not precise or unnecessary altogether?
Summary: "Cannot retrieve definition for form bean null" warning
too late and not precise or unnecessary altogether?
Product: Struts
Version: 1.0 Final
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Unknown
AssignedTo: struts-dev@jakarta.apache.org
ReportedBy: hauser@acm.org
CC: stefan.berger@softborg.com
For some simple forms, we noticed that having in the jsp just
<html:form action="/nextAction.do" >
is sufficient if the submit button values are retrieved via:
String yesBtn = request.getParameter("submitPropertyName");
The corresponding form was never declared in the jsp, in fact, it never even
existed as a Java class.
Now it turns out that this was only possible because there was another form
we used globally for language switching (both declared in struts-config.xml and
existing as java class). This language form, however was not named in
"nextAction"'s <action path=... ,
only globally.
Once we removed that other (language-switcher) form, we finally got the
below stacktrace and error message.
Conclusion:
1) The form bean now identified as being null was filled with another form that
a) wasn't used by this form's action anyway
b) was only globally declared
2) So, if it is possible to access form values without a form existing, I guess
a) Either I should get a warning whenever a form uses an action that
doesn't have a declaration for this form -- or
b) let the form not complain at all since doesn't really need the form anyway.
javax.servlet.ServletException: Cannot retrieve definition for form bean null
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:533)
at org.apache.jsp.ourFilejsp._jspService(ourFilejsp.java:86)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
...
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org