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
und das ManagedBean
hat jemand eine Ahnung was hier schieflauft und wiso Glasfish das Property nicht findet?
Besten Dank für eure Hilfe
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:
/index.xhtml @18,94 value="#{loginView.customer.username}": The class 'view.beans.LoginManagedBean' does not have the property 'customer'.
Hier mein index.xhtml
HTML:
<?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>
und das ManagedBean
Code:
@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