This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSF beginner's question  RSS feed

 
Yuan Ye
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone, I am beginner in JSF. Just followed a tutorial, got some strange error.

The tutorial is very simple:

a jsp page is as following:



I have made sure the messages.properties file is under bundle folder in classes directory. However seems the association is not working. I see these on the page

#{msg.inputname_header}
#{msg.prompt}....

All the values are not bound, only the original annotation.

What are the possible reason this could be?

Thanks very much. I am using tomcat 6.0 and copied the two jsf jar files from moharra project.



 
Yuan Ye
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seems the problem is the jsf jars. I got JSF (Mojarra) 2.0 jars and it doesn't work this way, when I replaced the jars with older versions, it works.
So does that means jsf 2.0 is not compatible with jsf 1.2? Which version should I start to learn?

Thanks,

 
suresh dasari
Ranch Hand
Posts: 121
Chrome Eclipse IDE Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yuan Ye,

make sure that property file is inside the resource folder too. In your case the path would be ideally like:

src/main/resource/bundle/messages.properties where "src/main/resouces" is the basic resource directory.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!