silverlight4

Broken In
Following facelet page is not rendering properly in the browser

Code:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "*www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="*www.w3.org/1999/xhtml"
      xmlns:h="*java.sun.com/jsf/html">
    <h:head>
        <title>Create a New Book</title>
    </h:head>
    <h:body>
        <h4>Create a new Book</h4>
        <br/>
        <h:form>
            <table>
                <tr>
                    <td><h:outputLabel value="ISBN: " ></h:outputLabel></td>
                    <td><h:inputText value="#{bookController.book.isbn}"></h:inputText></td>
                </tr>
                <tr>
                    <td><h:outputLabel value="Title " /></td>
                    <td><h:inputText value="#{bookController.book.title}"/></td>
                </tr>
                <tr>
                    <td><h:outputLabel value="Price: " /></td>
                    <td><h:inputText value="#{bookController.book.price}"/></td>
                </tr>
                <tr>
                    <td><h:outputLabel value="Descriptiom: " /></td>
                    <td><h:inputTextarea value="#{bookController.book.description}" cols="20" rows="5"/></td>
                </tr>

                <tr>
                    <td><h:outputLabel value="Number Of Pages: " /></td>
                    <td><h:inputText value="#{bookController.book.nbofpages}"/></td>
                </tr>

                <tr>
                    <td><h:outputLabel value="Illustrations: " /></td>
                    <td><h:selectBooleanCheckbox value="#{bookController.book.illustration}"/></td>
                </tr>
            </table>
            <h:commandButton action="#{bookController.doCreateBook}" value="Create a Book" />
        </h:form>
    </h:body>
</html>

It is only showing "Create new book" and nothing else.
What is the problem with the code?
 

furious_gamer

Excessive happiness
You must use
<%@ taglib uri="*java.sun.com/jsf/html" prefix="h" %>

this to import the taglib. Otherwise how did the page does know what

is h:form?
 
OP
S

silverlight4

Broken In
It is giving this error
XML Parsing Error: not well-formed
Code:
<%@ taglib uri="[URL]*java.sun.com/jsf/html[/URL]" prefix="h" %>
-^
It is an xhtml document
 
OP
S

silverlight4

Broken In
In web.xml mapping was for /faces/*
but i was directly hitting the facelet page using /newBook.xhtml instead of
/faces/newBook.xhtml
 
Top Bottom