Search in This Blog

Cannot cast from ActionForm to form error in struts

I was working in struts and faced "Cannot cast from ActionForm to StudentForm" error.

to solve follow the steps:

Ans: It means you have not import
"import org.apache.struts.action.ActionForm;" int Form class
and can not extends "ActionForm" in that class
for ex:

import org.apache.struts.action.
public class StudentForm  extends ActionForm {