Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add custom namespace to HTML element in JSF?

Tags:

java

facebook

jsf

I'm trying to add my custom namespace to <html> element in JSF .xhtml file (actually, this namespace is not mine, it's Facebook's):

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
    xmlns:fb="http://www.facebook.com/2008/fbml">

JSF/Mojarra gives me a warning:

Warning: This page calls for XML namespace http://www.facebook.com/2008/fbml 
declared with prefix fb but no taglibrary exists for that namespace.

I can understand what it means, but how to solve the problem?

like image 222
yegor256 Avatar asked Mar 01 '11 10:03

yegor256


1 Answers

You can suppress the warning by adding the following lines in the web.xml file of your application:

..
      <!-- Debug Output for Development -->
      <context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>
        <param-value>Production</param-value>
      </context-param>
...
like image 145
Benny Neugebauer Avatar answered Oct 16 '22 13:10

Benny Neugebauer