• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Cannot retrieve definition for form bean null

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am new to Struts i m not able to solve the above error.

in brief:
detail.jsp
----------

<html:form action="detail">
<bean:message key="detail.firstname"/>
<html:text property="firstname"/><br>
<bean:message key="detail.lastname"/>
<html:text property="lastname"/><br>
<bean:message key="detail.gender"/>
<html:select property="gender">
<html ption value="male">
<bean:message key="detail.select"/>
</html ption>
<html ption value="male">
<bean:message key="detail.male"/>
</html ption>
<html ption value="female">
<bean:message key="detail.female"/>
</html ption>
</html:select><br>
<bean:message key="detail.age"/>
<html:text property="age"/><br>
<bean:message key="detail.empid"/>
<html:text property="empid"/><br>
<html:submit>
<bean:message key="detail.submit"/>
</html:submit>
</html:form>

struts-connfig.xml
------------------
<struts-config>

<form-beans>
<form-bean name="detailbean" type="com.org.test.DetailBean"/>
<form-bean name="loginbean" type="com.org.test.LoginBean"/>
</form-beans>

<action-mappings>
<action path="/login"
name="loginbean"
type="com.org.test.LoginAction"
input="/pages/login.jsp">
<forward name="success" path="/pages/detail.jsp"/>
<forward name="failure" path="/pages/login.jsp"/>
</action>
<action path="/detail"
name="detailbean"
type="com.org.test.DetailAction">
<forward name="success" path="/pages/submit.jsp"/>
</action>
<action path="/final"
type="com.org.test.FinalAction"
parameter="submitAction">
<forward name="list" path="/pages/list.jsp"/>
<forward name="new" path="/pages/detail.jsp"/>

</action>
final

</action-mappings>
<message-resources parameter="resources.application"/>

</struts-config>

Hope for the solution
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not 100% sure this is the problem, but try changing

to
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you create FormBean class extending ActionForm? This class needs to have properties and getters/setters methods as per fields mentioned in your form.
reply
    Bookmark Topic Watch Topic
  • New Topic