I'm not sure where to post this question. It might be a JSF thing but the
problem I have only happens when I run mvn jetty:run.

For some reason when I use mvn jetty:run my JSF pages render wierd. The JSF
components render outside the <html> tag. If I build a war and deploy it to
jetty or tomcat the page renders as expected. ... Any ideas would be much
appreciated.

Here's the JSP. The bad output is below.
----- JSP -----------------------------------
<%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f" %>
<%@ taglib uri="http://myfaces.apache.org/tomahawk"; prefix="t" %>

<html>
<head>
    <title>User Registration</title>
    <link rel="stylesheet" href="styles/keys.css" type="text/css"
media="screen"/>
</head>
<body>
<f:view>
    <h2><h:outputText value="User Registration"/></h2>
    <h:outputText value="Modify/Update the information for users in the text
field boxes
                and click the OK button."/>
    <br/>
    <h:form id="userRegistrationForm">

        <h:messages/>

        <h:panelGrid columns="4">
            <h:outputText value="*First Name:"/>
            <h:inputText value="#{userRegistrationController.user.firstName
}"
                         id="firstNameEntry" required="true"/>
            <h:outputText value="*Last Name:"/>
            <h:inputText value="#{userRegistrationController.user.lastName}"
                         id="lastNameEntry" required="true"/>
        </h:panelGrid>

        <h:commandButton action="success"
                         actionListener="#{
userRegistrationController.registerUser}" value="OK"/>
        <h:commandButton value="Reset" type="reset"/>

    </h:form>
</f:view>
</body>
</html>
-----------------------------------------

---- resulting html ------------------------

    <h2>User Registration</h2>
    Modify/Update the information for users in the text field boxes
                and click the OK button.
    <br/>

<form id="userRegistrationForm" name="userRegistrationForm"
method="post" action="/keys/test.jsf"
enctype="application/x-www-form-urlencoded">
<input type="hidden" name="userRegistrationForm" value="userRegistrationForm" />
<table>
<tbody>
<tr>
<td>*First Name:</td>
<td><input id="userRegistrationForm:firstNameEntry" type="text"
name="userRegistrationForm:firstNameEntry" /></td>
<td>*Last Name:</td>

<td><input id="userRegistrationForm:lastNameEntry" type="text"
name="userRegistrationForm:lastNameEntry" /></td>
</tr>
</tbody>
</table>
<input type="submit" name="userRegistrationForm:j_id_id35" value="OK"
/><input type="reset" name="userRegistrationForm:j_id_id37"
value="Reset" /><input type="hidden" name="javax.faces.ViewState"
id="javax.faces.ViewState"
value="mUUiAHpX4mUz1jbTQWsYDgwwdlJk7EbLXyoxRcBOJTyVRjIL0WRyGneQ+kw29gFT43aXwg3YtZj3aAZs/tOIhW+zzgXIS9kt7dDDaTf+/sY="
/>
</form>



<html>
<head>
    <title>User Registration</title>
    <link rel="stylesheet" href="styles/keys.css" type="text/css"
media="screen"/>
</head>

<body>

<!-- MYFACES JAVASCRIPT -->

</body>
</html>

---------------------------------

Reply via email to