Привет, я изучаю JSF 2.0
Использование Tomcat 6.0.26
При запуске простой страницы не отображается h: commandButton, а источник HTML в браузере отображается <h:commandbutton value="Click (Good)" action="successful-test"></h:commandbutton>
Код:
<!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">
<h:head><title>JSF 2.0: Server Test</title>
<link href="./css/styles.css"
rel="stylesheet" type="text/css"/>
</h:head>
<h:body>
<div align="center">
<table border="5">
<tr><th class="title">JSF 2.0: Server Test</th></tr>
</table>
<p/>
<h:form>
<fieldset>
<legend>Valid action</legend>
Click button. You should get success page.<br/>
<h:commandButton value="Click (Good)" action="successful-test" />
</fieldset>
<p/>
<fieldset>
<legend>Invalid action</legend>
Click button. You should get error message about not being
able to find matching navigation case.<br/>
<h:commandButton value="Click (Bad)" action="bogus-outcome" />
</fieldset>
</h:form>
</div></h:body></html>
HTML-код после запуска tomcat:
<!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">
<h:head><title>JSF 2.0: Server Test</title>
<link href="./css/styles.css"
rel="stylesheet" type="text/css"/>
</h:head>
<h:body>
<div align="center">
<table border="5">
<tr><th class="title">JSF 2.0: Server Test</th></tr>
</table>
<p/>
<h:form>
<fieldset>
<legend>Valid action</legend>
Click button. You should get success page.<br/>
<h:commandButton value="Click (Good)" action="successful-test" />
</fieldset>
<p/>
<fieldset>
<legend>Invalid action</legend>
Click button. You should get error message about not being
able to find matching navigation case.<br/>
<h:commandButton value="Click (Bad)" action="bogus-outcome" />
</fieldset>
</h:form>
</div></h:body></html>
что случилось?