package UserBean; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import Dao.UserDao; public class AddUserAction extends Action { @Override public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { // TODO Auto-generated method stub user u=(user)form; UserDao ud=new UserDao(); ud.addUser(u); return mapping.findForward("list"); } }
user u=(user)form;怎么解决Cannot cast from ActionForm to user?求指点
qq_莫非
相关分类