I am currently working my way through a
struts tutorial, I have a problem with the following code:
String username = ((LoginForm)form).getUsername();
I get the following compilation error:
apressstruts/LoginAction.java [49:1] inconvertible types
found : org.apache.struts.action.ActionForm
required: apressstruts.LoginForm
String username = ((LoginForm)form).getUsername();
^
This is a direct snippet from the apache struts tutorial.
public ActionForward perform(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException
{
String user = null;
String target = new String("Success");
//Get parameters from the login Form
String username = ((LoginForm)form).getUsername();
return null;
}
Thanks for any help.
Tony