ERLEDIGT
NEIN
NEIN
ANTWORTEN
1
1
ZUGRIFFE
895
895
EMPFEHLEN
-
Hallo zusammen,
ich versuche mich gerade in JEE einzuarbeiten.
Habe mit Netbeans ein MavenJEE-Project erstellt.
Wenn ich mein erstes Test-Project auf den Glasfish-Server deploye erhalte ich folgende Fehlermeldung:
Hier mein index.xhtml/index.xhtml @18,94 value="#{loginView.customer.username}": The class 'view.beans.LoginManagedBean' does not have the property 'customer'.
und das ManagedBeanHTML-Code:<?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"> <h:head> <title>JEE6-Test mit JSF</title> </h:head> <h:body> <p> <f:view> <h:form> <h:outputLabel value="Login"/><h:inputText value="#{loginView.customer.username}"/><br /> <h:outputLabel value="Password"/><h:inputSecret value="#{loginView.customer.password}"/><br /> <h:commandButton action="#{loginView.login()}" value="Login"/> <h:commandButton action="createCustomer" value="New Customer" /> </h:form> </f:view> </p> </h:body> </html>
Code :1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
@ManagedBean(name="loginView") @RequestScoped public class LoginManagedBean { private Customer customer; @EJB private UserControlSessionBean userControlSessionBean; /** Creates a new instance of LoginManagedBean */ public LoginManagedBean() { customer = new Customer(); } public boolean login(){ if (userControlSessionBean.loginCustomer(customer) != null) return true; return false; } public boolean createNewUser(){ if (userControlSessionBean.newCustomer(customer) != null) return true; return false; } public Customer getCustomer() { return customer; } public void setCustomer(Customer customer) { this.customer = customer; } }
hat jemand eine Ahnung was hier schieflauft und wiso Glasfish das Property nicht findet?
Besten Dank für eure Hilfe
-
Benutzt du vielleicht als import javax.enterprise.context.RequestScoped statt javax.faces.bean.RequestScoped ?
Ähnliche Themen
-
JSP mit JSTL findet Property nicht
Von wakoz im Forum Enterprise Java (JEE, J2EE, Spring & Co.)Antworten: 8Letzter Beitrag: 08.04.10, 15:31 -
RectF property nicht zugreifbar
Von SpongeStone im Forum .NET Windows FormsAntworten: 6Letzter Beitrag: 04.02.09, 22:26 -
Property Datei nicht überschreiben
Von BetaRR400 im Forum JavaAntworten: 3Letzter Beitrag: 18.09.08, 12:16 -
JSF-Frage: Attribute einer ManagedBean in einer anderen Managedbean lesen
Von navino im Forum Enterprise Java (JEE, J2EE, Spring & Co.)Antworten: 0Letzter Beitrag: 21.04.08, 08:57 -
Property will nicht im Property-Fenster erscheinen
Von yesso im Forum .NET ArchivAntworten: 2Letzter Beitrag: 29.03.05, 19:14





Zitieren
Login





