File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Target unreachable, identifier resolved to null

 
tom davies
Ranch Hand
Posts: 168
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is only my second jsf. The first just redirected to a new page.
I want to get the user inputted number, check to see if it equals a random number i generated and then on a new page, display the users guess, the random number and a response depending on if they guessed right or not.
When i submit the form on the input page i get this error

/play_game.xhtml @12,85 value="#{GameBean.guess}": Target Unreachable, identifier 'GameBean' resolved to null

User input page


Output page


Game Bean
 
Vladimir Mokrozub
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By default, bean names starts with a lowercase letter, "gameBean" in your case.
Also, it seems you misprinted bean name in the output page:
 
tom davies
Ranch Hand
Posts: 168
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, i noticed the spelling mistake after i had posted this. I have changed the bean to gameBean and adjusted all appropriate tags and it works now
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic