nerdexam
Oracle

1Z0-900 · Question #6

You have been asked to implement internationalization in your JSF web application. Where do you configure the supported locales?

The correct answer is A. in the <f:view> tag of the Facelet page. There appears to be an error in this answer key - the marked correct answer (A) is actually incorrect for this question. Supported locales in a JSF application are configured in faces-config.xml (option C), using the <locale-config> element nested inside <application>: ``xml…

Develop Web Applications using JSFs

Question

You have been asked to implement internationalization in your JSF web application. Where do you configure the supported locales?

Options

  • Ain the <f:view> tag of the Facelet page
  • Bin the web.xml file
  • Cin the faces-config.xml file
  • Din the src folder

How the community answered

(19 responses)
  • A
    89% (17)
  • B
    5% (1)
  • C
    5% (1)

Explanation

There appears to be an error in this answer key - the marked correct answer (A) is actually incorrect for this question. Supported locales in a JSF application are configured in faces-config.xml (option C), using the <locale-config> element nested inside <application>:

<application>
  <locale-config>
    <default-locale>en</default-locale>
    <supported-locale>fr</supported-locale>
    <supported-locale>de</supported-locale>
  </locale-config>
</application>

Why the distractors are wrong:

  • A (<f:view>) - <f:view locale="..."> overrides the locale for a single page at runtime; it does not define which locales the application supports globally.
  • B (web.xml) - web.xml handles servlet configuration (filters, listeners, context params), not JSF-specific i18n settings.
  • D (src folder) - A folder is not a configuration location; resource bundles live there but locale registration does not.

Memory tip: Think of faces-config.xml as the JSF application's "master settings" file - anything application-wide in JSF (navigation rules, managed beans in older versions, locale support) goes there, not in individual pages or the generic servlet descriptor.

Note for your exam prep: If this question appears verbatim on your exam with answer A marked correct, flag it - most authoritative JSF references (including the spec and Oracle docs) place <locale-config> in faces-config.xml.

Topics

#JSF Internationalization#Facelet Configuration#Locale Management#f:view tag

Community Discussion

No community discussion yet for this question.

Full 1Z0-900 Practice