0

According to those tutorials about i18n in SpringFaces:

  1. http://www.javacodegeeks.com/2012/06/spring-jsf-integration.html
  2. https://coderphil.wordpress.com/2011/11/15/integrating-spring-javaserver-faces-internationalization-and-localization/

We should be able to use Spring messageSource bean directly in XHTML Page using <s:messageSource> tag:

<s:messageSource source="#{messageSource}" var="messages"/>
  <p>
     <h:outputText value="#{messages.hello}"/>
  </p>
</s:messageSource>

However, those tutorials does not make any mention of the XML namespace URI which I should specify in xmlns:s="...".

What is the proper XML namespace URI?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Abdennour TOUMI
  • 87,526
  • 38
  • 249
  • 254

2 Answers2

2

I nearly resorted to the "Google it" comment, but after a bunch of googling myself, I'm amazed how obscure/scarce this information is. Almost no one giving a "hello world" tutorial even mentions the tag library's namespace. The Spring docs are even more confusing on this. What you're looking for is http://www.springframework.org/tags. I'd leave a comment on those tutorials you linked also, for the authors to include this trivial but fundamental piece of info

kolossus
  • 20,559
  • 3
  • 52
  • 104
0
xmlns:s="http://springframework.org/tags/springfaces"

as defined in springfaces/src/main/resources/META-INF/springfaces.taglib.xml file of springfaces library (Mind not to confuse it with spring-faces).

Remember to include springfaces as a dependency.

You can figure it out looking for any xhtml file in its showcase, like this for example.

Aníbal
  • 785
  • 8
  • 24