ActionForm:
String[] fond=req.getParameterValues("fond");
forms.setFond-----参数列表该怎样写啊?
FormBean:
public void setFond(String Fond[])
{ int i=0;
for(i=0;i<=6;i++)
this.Fond[i]=Fond[i];
}
/** return Fond */
public String getFond()
{
int i=0;
for(i=0;i<this.Fond.length;i++)
{
if(Fond[i].equals("1"))
this.fonds=this.fonds+"sports,";
else if(Fond[i].equals("2"))
this.fonds=this.fonds+"computer,";
else if(Fond[i].equals("3"))
this.fonds=this.fonds+"music,";
else if(Fond[i].equals("4"))
this.fonds=this.fonds+"tour,";
else if(Fond[i].equals("5"))
this.fonds=this.fonds+"photograph,";
else if(Fond[i].equals("6"))
this.fonds=this.fonds+"other";
}
return this.fonds;
}
是类找不到,确保Form类在classpath里找的到,如果用了html标志和话,请确保action="?"问号的内填的路径是action mapping里的路径,并action mapping的name属性对应的form配置的formbean的type写的是正确的。