This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes data stored in DynaActionForm  is not displayed on jsp page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "data stored in DynaActionForm  is not displayed on jsp page" Watch "data stored in DynaActionForm  is not displayed on jsp page" New topic
Author

data stored in DynaActionForm is not displayed on jsp page

Vilpesh Mistry
Ranch Hand

Joined: May 27, 2003
Posts: 62
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


Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: data stored in DynaActionForm is not displayed on jsp page
 
Similar Threads
accessing dynaactionform in action class
newbie problem - populating Action form
Struts Cancel Button submits the form
Struts validation framework- for single form, multiple actions
Struts and Popup