I have an eclipse JSF example where the ExampleController class cannot find the Bundle.properties file. Here is the dynamic web project snapshot that was used to create the JSF project,
Here is a snapshot of the project file structure. You can see the bundles file in properties folder,
Here is a snapshot of the class code. Notice the file name in the getBundle methode,
@ManagedBean(name = "exampleController")
@RequestScoped
public class ExampleController {
private String exampleProperty;
* Creates a new instance of ExampleController
*/
public ExampleController() {
exampleProperty = "Used to instantiate the bean.";
FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_INFO,
ResourceBundle.getBundle("WebContent/properties/Bundle.properties").getString("ExampleMessage"), null);
FacesContext.getCurrentInstance().addMessage(null, facesMsg);
}
Finally, here is a snapshot of the error when I run the code against the tomcat server,
I have tried several combinations of file names but continue to get file not found errors when the server runs. What am I missing?
Best Regards, Steve Mansfield