You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Mlinar, Mario" <Ma...@shs.de> on 2004/02/18 15:12:50 UTC
FormBean not found in request ...
My Action puts a FromBean into the request and forwards to a view.
The view can´t find the formBean and creates a new Instance which of course
is empty:-(
Here is my code:
struts-config.xml
<action path="/gpSucheEdit"
type="de.shs.partnerportal.adb.ui.web.actions.GpDetailAction"
parameter="/gp_suche.jsp">
<forward
name="freelance"
path="/edit/gp_freelance.jsp" />
<forward
name="private"
path="/edit/gp_private.jsp" />
<forward
name="business"
path="/edit/gp_business.jsp" />
</action>
<action path="/freelanceEdit"
name="freelanceEdit"
scope="request"
validate="false"
input="/edit/gp_freelance.jsp" />
<form-bean name="freelanceEdit"
type="de.shs.partnerportal.adb.ui.web.forms.GpFreelanceForm" />
snippet of my Action´s code:
....
GpFreelanceForm myForm = .... some business code
request.setAttribute("freelanceEdit", myForm);
return mapping.findForward("freelance");
-> myForm ist not null.
in my JSP I use this:
<html:form action="/freelanceEdit">
... my elements ...
</html:form>
Changing request to session makes it work fine.
What`s the problem??
Re: FormBean not found in request ...
Posted by Dirk Markert <di...@dr-markert.de>.
In >>action path="/freelanceEdit"<< the type is missing. Did you copy
it correctly in your mail? Your code should work.
***************************************************************
MM> My Action puts a FromBean into the request and forwards to a view.
MM> The view can´t find the formBean and creates a new Instance which of course
MM> is empty:-(
MM> Here is my code:
MM> struts-config.xml
MM> <action path="/gpSucheEdit"
MM>
MM> type="de.shs.partnerportal.adb.ui.web.actions.GpDetailAction"
MM> parameter="/gp_suche.jsp">
MM> <forward
MM> name="freelance"
MM> path="/edit/gp_freelance.jsp" />
MM> <forward
MM> name="private"
MM> path="/edit/gp_private.jsp" />
MM> <forward
MM> name="business"
MM> path="/edit/gp_business.jsp" />
MM> </action>
MM> <action path="/freelanceEdit"
MM> name="freelanceEdit"
MM> scope="request"
MM> validate="false"
MM> input="/edit/gp_freelance.jsp" />
MM> <form-bean name="freelanceEdit"
MM> type="de.shs.partnerportal.adb.ui.web.forms.GpFreelanceForm" />
MM> snippet of my Action´s code:
MM> ....
MM> GpFreelanceForm myForm = .... some business code
MM> request.setAttribute("freelanceEdit", myForm);
MM> return mapping.findForward("freelance");
MM> -> myForm ist not null.
MM> in my JSP I use this:
MM> <html:form action="/freelanceEdit">
MM> ... my elements ...
MM> </html:form>
MM> Changing request to session makes it work fine.
MM> What`s the problem??
Regards,
Dirk
+------- Quality leads ---------------------------------------+
| Dirk Markert dirk.markert@dr-markert.de |
| Dr. Markert Softwaretechnik AG |
| Joseph-von-Fraunhofer-Str. 20 |
| 44227 Dortmund |
+---------------------------------->>>>>>> to success! <<<<<<-+
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org