Java EE Directory Structure
I have a problem with following tutorial:
http://www.mkyong.com/jsf2/jsf-2-internationalization-example/
In faces-context file you have to declare the place where all the language properties开发者_运维百科-files are (<base-name>HERE</base-name>
). But in that example they use apparently maven2 and so they have a resource folder.
I am using eclipse and dynamic web project, that's why there is no resource folder. I tried a few possibilities like adding a new folder to the build path but I don't get it work.
Can you tell me please where to place those files to let my app find it. thank you so much
In addition I add a picture of my directory-structure:
They need to end up in the runtime classpath. The WebContent isn't part of the runtime classpath.
In your case, just drop them in the Java Resources folder. Imagine that they are placed in a package com.example.i18n
, then you can specify as basename com.example.i18n.locale
(although I would prefer text
or messages
over locale
since they are actually no locale files).
Related:
- How to internationalize a JSF 2.0 webapplication with UTF-8 properties files without native2ascii?
精彩评论