简体   繁体   中英

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:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM