I have a problem with one JSF page. This is the source code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:h="http://java.sun.com/jsf/html">
<head>
<title>Login</title>
<link rel="stylesheet" type="text/css" href="resources/css/style.css" />
<script src="resources/js/cufon-yui.js" type="text/javascript"></script>
<script src="resources/js/ChunkFive_400.font.js" type="text/javascript"></script>
<script type="text/javascript">
Cufon.replace('h1',{ textShadow: '1px 1px #fff'});
Cufon.replace('h2',{ textShadow: '1px 1px #fff'});
Cufon.replace('h3',{ textShadow: '0px 1px #000'});
Cufon.replace('.back');
</script>
</head>
<body>
<div class="wrapper">
<div class="content">
<div id="form_wrapper" class="form_wrapper">
<h:form class="login active">
<h3><img style="text-align:center" src="resources/images/title.png"/></h3>
<div>
<label>Username:</label>
<h:inputText value="#{loginController.user}" autocomplete="off"/>
</div>
<div>
<label>Password:</label>
<h:inputSecret value="#{loginController.password}" autocomplete="off"/>
</div>
<div class="bottom">
<h:commandButton label="Login" value="Login" action="#{loginController.userCompare}"/>
<div class="clear"></div>
</div>
</h:form>
</div>
<div id="error_message" style="text-align:center; padding-top:50px; font-style:normal; font-size:20px">
#{loginController.error_Database}
#{loginController.error_Message}
</div>
</div>
</div>
</body>
</html>
When I load the page this error message appears at the bottom in the page:
Warning: This page calls for XML namespace declared with prefix body but no taglibrary exists for that namespace.
Warning: This page calls for XML namespace declared with prefix title but no taglibrary exists for that namespace.
Warning: This page calls for XML namespace declared with prefix link but no taglibrary exists for that namespace.
Warning: This page calls for XML namespace declared with prefix img but no taglibrary exists for that namespace.
Warning: This page calls for XML namespace declared with prefix div but no taglibrary exists for that namespace.
Warning: This page calls for XML namespace declared with prefix div but no taglibrary exists for that namespace.
Warning: This page calls for XML namespace declared with prefix div but no taglibrary exists for that namespace.
Warning: This page calls for XML namespace declared with prefix div but no taglibrary exists for that namespace.
Warning: This page calls for XML namespace declared with prefix div but no taglibrary exists for that namespace.
Warning: This page calls for XML namespace declared with prefix div but no taglibrary exists for that namespace.
Warning: This page calls for XML namespace declared with prefix div but no taglibrary exists for that namespace.
Warning: This page calls for XML namespace declared with prefix div but no taglibrary exists for that namespace.
Can you give me idea how to fix the problem? I suppose that the problem is in the JSF tags.
XML Namespaces - The xmlns Attribute When using prefixes in XML, a namespace for the prefix must be defined. The namespace can be defined by an xmlns attribute in the start tag of an element. The namespace declaration has the following syntax. xmlns:prefix="URI".
In XML, elements name are defined by the developer so there is a chance to conflict in name of the elements. To avoid these types of confliction we use XML Namespaces. We can say that XML Namespaces provide a method to avoid element name conflict.
An XML namespace is a collection of names that can be used as element or attribute names in an XML document. The namespace qualifies element names uniquely on the Web in order to avoid conflicts between elements with the same name.
Figure 1: Elements and attributes in XML Schema namespace are used to write an XML Schema document, which generates elements and attributes as defined by user and puts them in {target namespace}. This {target namespace} is then used to validate the XML instance.
Try with this namespace declaration
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With