• 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

data stored in DynaActionForm is not displayed on jsp page

 
Ranch Hand
Posts: 62
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

in my action class (DoOfficeAction) , i set the value of the ActionForm bean(officeForm) associated with that action and forward control to a jsp page where i need to display the value stored inside the (officeForm) bean.

<action path="/dooffice" type="com.in.vilpesh.DoOfficeAction" name="officeForm" validate="false" scope="session">
<forward name="Do" path="/dooffice.jsp" redirect="false" />
<forward name="Failure" path="/error.jsp" redirect="false" />

<form-bean name="officeForm" type="org.apache.struts.action.DynaActionForm">
<form-property name="officeId" type="java.lang.Integer" />
<form-property name="officeCode" type="java.lang.String" />

((DynaActionForm) form).set("officeCode",office.getOfficeCode()); ...where
office.getOfficeCode() gives the office code.

return (mapping.findForward("Do")); .... written in DoOfficeAction

PROBLEM 1: i am using following on the jsp page but it doesnot show the data stored inside officeForm bean inside the DoOfficeAction for officeCode.

<html:text name="officeForm" property="officeCode"/>

i am using eclipse 3.0 so in Debug perspective in the Window Variables/Breakpoints, i see that when the control reaches findforward(), value of officeCode is set inside the officeForm bean, but once findForward("Do") is executed, i donot get the data on the dooffice.jsp.


thanks
 
reply
    Bookmark Topic Watch Topic
  • New Topic