Why do we Typecast FormBean object with ActionForm in execute(...,...,...,..) method in Struts?

Public ActionForward execute(ActionMapping am,ActionForm af,Req,Res)
{
Myfornbean mf=(Myformbean)af;
//why we are typrcasting here

Questions by koti.tirumala   answers by koti.tirumala

Showing Answers 1 - 0 of 0 Answers

sivaram

  • Jan 12th, 2012
 

We define our form bean by extending ActionForm or DynaActionForm.
In execute() method, we are getting the ActionForm object and to get the form values we need to get our form bean object. So it is must to type cast it.
Please correct if Im wrong.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions