Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Java (Beans und JSP)

Empfohlene Antworten

Veröffentlicht

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? :D

gruß alex

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


<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.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.