jsf - javax.el.ELException for property not found -


i have following html file:

<h:body>     <h:form id="loginform">         <p:growl id="msg" showdetail="true" life="3000" />         <p:panel header="login" style="width: 360px;">             <h:panelgrid id="loginpanel" columns="2">                 <h:outputtext value="username" />                 <p:inputtext id="username" value="#{loginbean.uname}" ></p:inputtext>                 <p:spacer></p:spacer>                 <p:message for="username" ></p:message>                 <h:outputtext value="password" />                 <p:password id="password" value="#{loginbean.password}"  feedback="false"></p:password>                 <p:spacer></p:spacer>                 <p:message for="password"></p:message>                 <p:spacer></p:spacer>                 <p:commandbutton action="#{loginbean.loginpro}" value="login" update="loginform" ajax="true"></p:commandbutton>             </h:panelgrid>         </p:panel>     </h:form> </h:body> 

and loginbean follow:

@managedbean(name = "loginbean") @sessionscoped public class loginbean implements serializable {      private static final long serialversionuid = 1l;     private string uname;     private string password;       public string getpassword() {         return password;     }      public void setpassword(string password) {         this.password = password;     }      public string getuname() {         return uname;     }      public void setuname(string uname) {         this.uname = uname;     }      public string loginpro() {         boolean result = false;         try {             result = userdao.login(uname, password);         } catch (sqlexception e) {             e.printstacktrace();         }         if (result) {             return "home";         } else {             facescontext.getcurrentinstance().addmessage(                     null,                     new facesmessage(facesmessage.severity_warn,                             "invalid login!",                             "please try again!"));             return "login";         }     } 

i keep on receiving following message eventhough loginpro method exists on loginbean:

javax.servlet.servletexception: /index.xhtml: property 'loginpro' not found on type beans.loginbean javax.faces.webapp.facesservlet.service(facesservlet.java:659) org.apache.tomcat.websocket.server.wsfilter.dofilter(wsfilter.java:52)

any opinions?

try loginbean.loginpro()

with loginbean.loginpro u said there property variable get/set


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -