我正在尝试实现 jsf + primefaces + twitter bootstrap:
<!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"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.prime.com.tr/ui"
>
<h:head>
<title>IMPORT JSF SET ATTRIBUTES</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="" />
<meta name="author" content="" />
<!-- Le styles -->
<h:outputStylesheet name="css/bootstrap.css" />
<h:outputStylesheet name="css/bootstrap.min.css" />
<h:outputStylesheet name="css/override.css" />
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Le fav and touch icons
<link rel="shortcut icon" href="../assets/ico/favicon.ico">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png">
-->
</h:head>
<h:body>
<div class="navbar navbar-inverse navbar-static-top">
<div class="navbar-inner navbar-large">
<div class="container">
<a class="brand" href="#">Name</a>
<ul class="nav">
<li><a href="#buy">Link</a></li>
<li><a href="#about">Link</a></li>
</ul>
<form class="navbar-form pull-left">
<div class="input-append offset1">
<h:input class="span5" placeholder="put search terms here"
type="text" />
<button class="btn" type="submit">
<i class="icon-search"></i>
</button>
</div>
</form>
<ul class="nav pull-right">
<li class="dropdown"><a class="dropdown-toggle"
data-toggle="dropdown" href="#"> How to <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li class="nav-header">Link</li>
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
<li><a href="#">Link 3</a></li>
<li class="divider"></li>
<li class="nav-header">Link</li>
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
<li><a href="#">Link 3</a></li>
</ul></li>
<li><a href="#login">Login</a></li>
<li><a href="#register">Signup</a></li>
</ul>
</div>
</div>
</div>
<div class="container">[Template content will be inserted here]</div>
<footer>
<ul class="inline text-center">
<li>© 2013</li>
</ul>
</footer>
<!--/.fluid-container-->
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<h:outputScript name="js/jquery-1.7.2.min.js" />
<h:outputScript name="js/bootstrap.min.js" />
<h:outputScript name="js/jquery.dataTables.min.js" />
<h:outputScript name="js/bootstrap.js" />
</h:body>
</html>
但是,我得到:
<h:input> Tag Library supports namespace: http://java.sun.com/jsf/html, but no tag was defined for name: input
我真的很感谢你的回答!