java.lang.InstantiationException: nie znaleziono fasoli [nazwa] w zakresie
Uczę się teraz korzystać z jsp i fasoli i nie mogę zrozumieć, co mam na temat.
Próbuję utworzyć fasolę w następujący sposób: ...
i otrzymuję błąd:
java.lang.InstantiationException: nie znaleziono rezerwacji bean w zakresie
Rozejrzałem się online i większość ludzi wydaje się polecać używanie class = "..." zamiast type = "..." lub użycie instrukcji importu. Robię już pierwszy i wypróbowałem to drugie ... jakieś pomysły?
To jest fasola:
package homework10;
public class Reservation {
private int groupSize;
private String status;
private double cost;
private boolean triedAndFailed;
public Reservation(){
}
public void setGroupSize(int gs)
{
groupSize = gs;
}
public int getGroupSize()
{
return groupSize;
}
public void setStatus(String str)
{
this.status = str;
}
public String getStatus()
{
return status;
}
public void setCost(double cost)
{
this.cost = cost;
}
public double getCost()
{
return cost;
}
public void setTriedAndFailed(boolean bool)
{
this.triedAndFailed = bool;
}
public boolean isTriedAndFailed()
{
return triedAndFailed;
}
}
a to jest początek strony jsp:
<head>
<!--<script type="text/javascript" src="functions8.js">
</script>-->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>BHC Calculator-HTML-validation + Servlet Version</title>
<jsp:useBean id = "reservation" class = "homework10.Reservation" scope = "session" />
</head>
Z góry dziękuję!