Veröffentlicht 14. November 200717 j Hallo, habe eine bean erstellt mit get- und set-Methoden. und sie in eine jsp eingebunden --> <jsp:useBean name="q" class="de.bla.bla.beans.QuadratBean"></jsp:useBean> wenn ich sie ausführen will kommt folgender Fehler: Fehlernachricht: JSPG0227E: Bei der Umsetzung von /QuadratBeanJSP.jsp: /QuadratBeanJSP.jsp(13,1) --> JSPG0076E: Das erforderliche Attribut type für JSP-Element jsp:useBean fehlt. wurde eine Ausnahme abgefangen. was kommt denn bei type hin? gruß alex
14. November 200717 j class="package.class" Instantiates a Bean from a class, using the new keyword and the class constructor. The class must not be abstract and must have a public, no-argument constructor. The package and class name are case sensitive. type="package.class" If the Bean already exists in the scope, gives the Bean a data type other than the class from which it was instantiated. If you use type without class or beanName, no Bean is instantiated. The package and class name are case sensitive. class="package.class" type="package.class" Instantiates a Bean from the class named in class and assigns the Bean the data type you specify in type. The value of type can be the same as class, a superclass of class, or an interface implemented by class. s'Amstel
16. November 200717 j <jsp:useBean id="q" class="de.bla.bla.beans.QuadratBean" scope="page"></jsp:useBean> <jsp:setProperty name="q" property="zahl" value="<%=zahl%>" /> Das Quadrat von Hatte für die id auch name genommen, deshalb hat es nicht funktioniert! Gruß Alex
Archiv
Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.