1

I read through the answers on Java EE 6: Target Unreachable, identifier 'helloBean' resolved to null about identifier being resolved to null. I am facing the similar issue here. My development environment is Eclipse Helios and tomcat 7.0.

I actually have both faces-config.xml and web.xml made compliant to JSF2.0, however, that doesn't solve the issue. It works when I have the faces-config to include the bean. Once I took it off, even though I am having the @ManagedBean annotation, it just doesn't work. I don't see and error or warning in tomcat startup console messages and logs.

Appreciate if anyone can assist.

The faces-config.xml I am using:

<?xml version="1.0" encoding="UTF-8"?>
<faces-config
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
    version="2.0">

 <managed-bean>
  <managed-bean-name>userManagedBean</managed-bean-name>
  <managed-bean-class>UserManagedBean</managed-bean-class>
  <managed-bean-scope>session</managed-bean-scope>
 </managed-bean>
</faces-config>
Community
  • 1
  • 1
snlm95
  • 75
  • 2
  • 8
  • Please post the prolog of your faces-config.xml. I suspect it points to JSF 1.2, not JSF 2.0. – Adrian Mitev May 20 '12 at 03:31
  • I added the faces-config.xml. – snlm95 May 20 '12 at 07:44
  • are you sure you imported the right classes ? import javax.faces.bean.ManagedBean; import javax.faces.bean.SessionScoped; and used them properly ? `@ManagedBean` `@SessionScoped` public class ... – Daniel May 20 '12 at 08:07

0 Answers0