Java EE Directory Structure

I have a problem with the following tutorial:

http://www.mkyong.com/jsf2/jsf-2-internationalization-example/

In the faces-context file, you must declare the location where all the language properties files ( <base-name>HERE</base-name> ) are located. But in this example, they are apparently using maven2, and therefore they have a resource folder.

I use eclipse and a dynamic web project, so there is no resource folder. I tried several features, such as adding a new folder to the build path, but I do not understand how this works.

Can you tell me where to place these files so that my application finds it. thank you very much

In addition, I add an image of my directory structure:

alt text

+4
source share
1 answer

They need to end up on their way to the runtime. WebContent is not part of the path to the runtime.

In your case, just leave them in the Java Resources folder. Imagine that they are placed in the package com.example.i18n , then you can specify com.example.i18n.locale as the basename (although I would prefer text or messages over locale , since they are actually not language files).

Connected:

+3
source

Source: https://habr.com/ru/post/1335247/


All Articles