struts问题
public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {
MYActionForm form = (MYActionForm) actionForm;
}
在struts里以上的这一句是MYActionForm form = (MYActionForm) actionForm是定义一个form对象,但为什么不是这样子呢?
MYActionForm form = new MYActionForm();
是什么原因?两种有区别吗?