0

I have a Java Class UserBean having Id and name two field . when i am excuting jsp file on tomcatserver i am getting Two type of error randomly :

1. Error Details :/AddUser.jsp(17,12) '#{UserBean.id}' Target Unreachable, identifier 'UserBean' resolved to null

2. /AddUser.jspNo saved view state could be found for the view identifier: /AddUser.jsp

where i am doing wrong i dnt know ...

can any body help me out.

thanks Nikhil

zytham
  • 594
  • 1
  • 11
  • 27

1 Answers1

3

I think there is miss mapping faces-config.xml

try this .. in faces-config.xml ,

<managed-bean>
    <managed-bean-name>UserBean</managed-bean-name>
    <managed-bean-class>com.java.web.user.UserBean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
</managed-bean>
9ine
  • 845
  • 2
  • 8
  • 18
  • hi .. problem is resolved. whether i have to use "UserBean" as mentioned in this managed-bean-name ? UserBean Instance name or class name i should use for that.. ??? – zytham Jul 11 '12 at 08:28
  • Yes class name is more suitable – 9ine Mar 21 '14 at 07:50