Sto iniziando ad approfondire le JSP e per lavorarci uso NetBeans.
Dal programma ho creato un nuovo progetto web ed ad un certo punto mi chiede se voglio usare tomcat o glassfish. Che differenza c'è tra i due?

Poi, per iniziare ho creato un Java Bean usando un template, ottenendo questo codice:

codice:
import java.beans.*;
import java.io.Serializable;

public class Student extends Object implements Serializable {
    public static final String PROP_SAMPLE_PROPERTY = "sampleProperty";

    private String sampleProperty;

    private PropertyChangeSupport propertySupport;

    public Student() {
        propertySupport = new PropertyChangeSupport(this);
    }

    public String getSampleProperty() {
        return sampleProperty;
    }

    public void setSampleProperty(String value) {
        String oldValue = sampleProperty;
        sampleProperty = value;
        propertySupport.firePropertyChange(PROP_SAMPLE_PROPERTY, oldValue, sampleProperty);
    }

    public void addPropertyChangeListener(PropertyChangeListener listener) {
        propertySupport.addPropertyChangeListener(listener);
    }

    public void removePropertyChangeListener(PropertyChangeListener listener) {
        propertySupport.removePropertyChangeListener(listener);
    }
}
Io nel corso di basi di dati ho visto i bean ma cose come il PropertyChangeListener no. Che utilità ha? Funziona come una specie di Observer?

Grazie