The Web page illustrated below is a simple but typical example.
<html> <head> <title>ZHTMLDemo</title> </head> <body> <h1>ZHTMLDemo</h1> <ulid="ul"> <li>Thefirstitem.</li> <li>Theseconditem.</li> </ul> <inputtype="button"value="AddItem""/> <br/> <inputid="inp0"type="text"/>+ <inputid="inp1"type="text"/>= <textid="out"/> </body> </html>
By naming it with the zhtml extension[51], it will be interpreted as a ZUML page by ZK loader. Then, instances of org.zkoss.zhtml.Html, org.zkoss.zhtml.Head and others are created accordingly. In other words, we created a tree of XHTML components at the server. Then, ZK renders them into a regular XHTML page and sends it back to the browser, like what we did for any ZUML pages.
[51] If you want every HTML pages to be ZUML pages, you could map the .html extension to DHtmlLayoutServlet. Refer to Appendix A in the Developer's Reference for details.