eclipse - Managed Beans not getting deployed with the rest of the application -



eclipse - Managed Beans not getting deployed with the rest of the application -

enviornment:

ide: eclipse 3.7 server: tomcat 7.0 jsf 2.0

i new jsf , started having unusual problem when seek deploy application.

for reason gets deployed except beans. started when noticed no matter did, couldn't access newly created bean facelet. noticed couldn't utilize new functions created in old beans.

i did little experiment took existing setter method in login bean, , changed from:

public void setname(string name) { this.name = name; }

to

public void setname(string name) { this.name = "not typed"; }

but value retrieved bean on next page value typed login form.

i think faces-config.xml , web.xml files both set correctly. googled problem , thing found adding @managedbean , @sessionscope annotations before bean declarations may help older versions of jsf, didn't work.

i have tried creating new server, , re-creating project, did not help either. here error getting new project (which has same files old project, files created properly, , contents pasted in):

an error occurred: javax.el.propertynotfoundexception: /login.xhtml @ line 21 , column 42 value="#{loginbean.name}": property 'name' not found on type com.tutorial.loginbean caused by: javax.el.propertynotfoundexception - /login.xhtml @ line 21 , column 42 value="#{loginbean.name}": property 'name' not found on type com.tutorial.loginbean

here login bean:

/** * loginbean.java * */ bundle com.tutorial; import javax.faces.application.facesmessage; import javax.faces.bean.managedbean; import javax.faces.bean.sessionscoped; import javax.faces.context.facescontext; import javax.faces.event.actionevent; @managedbean(name="loginbean") @sessionscoped public class loginbean { private string name; private string password; public string getname() { homecoming name; } public void setname(string name) { this.name = name; } public string getpassword() { homecoming password; } public void setpassword(string password) { this.password = password; } public void saveperson(actionevent actionevent) { facescontext.getcurrentinstance().addmessage(null, new facesmessage("welcome " + name + " " + password + "!")); } }

and here have fragment login.xhtml, uses variables in loginbean

<ui:define name="sidebar"> <p:accordionpanel multiple="true" activeindex="0,1"> <p:tab title="login" id="logintab"> <h:form> <h:panelgrid columns="1" style="width: 179px;" class="noborder"> <h:outputlabel for="username" value="username"></h:outputlabel> <p:message for="username" id="msgusername" /> <h:inputtext id="username" value="#{loginbean.name}" required="true" label="username"></h:inputtext> <h:outputlabel for="password" value="password"></h:outputlabel> <p:message for="password" id="msgpassword" /> <h:inputsecret id="password" value="#{loginbean.password}" required="true" label="password"> </h:inputsecret> <h:commandbutton action="login"></h:commandbutton> </h:panelgrid> </h:form> </p:tab> <p:tab title="information"> blah blah blah. </p:tab> </p:accordionpanel> </ui:define>

anyone know problem is?

sorry lengthy post.

did clean existing compiled code? seems there old classes hanging around. happens when using eclipse.

could tomcat classpath different eclipse class path.

eclipse jsf tomcat7 myfaces

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -