- This topic has 5 replies, 2 voices, and was last updated 18 years, 10 months ago by
Riyad Kalla.
-
AuthorPosts
-
ouafaaMemberhello,
i followed JSF Quickstart tutoriel to create a JSF project.i did all steps .
in the UserBean.java
FacesContext facesContext = FacesContext.getCurrentInstance() is underlined red in the editor.
i did not import the line import javax.faces.context.FacessContext ,i don’t know if it is necessay.
thank you in advance for your help.
when excuting the exemple i got the following error:
javax.servlet.ServletException: #{UserBean.loginUser}: javax.faces.el.EvaluationException: java.lang.Error: Unresolved compilation problems:
FacesContext cannot be resolved to a type
FacesContext cannot be resolved
FacesMessage cannot be resolved to a type
FacesMessage cannot be resolved to a type
FacesContext cannot be resolvedjavax.faces.webapp.FacesServlet.service(FacesServlet.java:209)
Riyad KallaMemberDid you add JSF Capabilities to your project? Additionally, did MyEclipse automatically add all the JARs under your WEB-INF/lib directory to your build path? If it didn’t, please add them manually.
Open your project properties, go to Java Build Path > Libraries, click Add, drill down to WEB-INF/lib and add them all, then hit OK.
ouafaaMemberhello,
thank you for your response.
i already added JSF Capabilities .
if i go to Java Build Path > Libraries, click Add, i have the message no entries available.
the structure of the project is like this:
+src
+J2EE Lib
+JRE Lib
+Jsf-api.jar
+Jsf-impl.jar
+Jstl.jar
+Standard.jar
-Webroot
+METAINF
-WEB-INF
Lib(empty)
Faces-config.xml
Html_basic.tld
Jsf_code.tld
Web.xml
UserLogin.jspthank you in advance
Riyad KallaMemberDo you have a quick-fix option for the red underlne in UserBean? Do you have an import at the top of the file for the class?
ouafaaMemberyes, there was a quick-fix to import the javax.faces.context.
thank you, now the uesrBean.class is generated.
but when i try to run the demo i have the following eror:
“password”: Conversion error occurred.
even i enter a right or a wrong password.
thank you in advance
Riyad KallaMemberPlease download the demo we provide with the guide and work backwards from there to figure out the differences:
http://myeclipseide.com/enterpriseworkbench/help/topic/com.genuitec.myeclipse.doc/html/quickstarts/jsf/JSFLoginDemo.zip -
AuthorPosts