jsfxml-namespacestaglibspring-faces

What is the XML namespace URI of Spring Message Facelets <s:messageSource> tag?


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?


Solution

  • 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