Instead of mangling this with my poor memory, I dug up an example from another online tutorial. NOTE, the example below is from the following tutorial.
http://www.javaranch.com/newsletter/200404/JSF_Part1.html
Here is how it looks in action
<f:view>
<h:form id="loginForm">
<h:message for="loginForm" /><br />
<h:outputText value="#{Message.username_label}" />
<h:inputText id="username" value="#{LoginBean.username}" required="true">
<f:validateLength maximum="15" minimum="3" />
</h:inputText>
<h:message for="username" /><br />
<h:outputText value="#{Message.password_label}" />
<h:inputSecret id="password" value="#{LoginBean.password}" required="true">
<f:validateLength maximum="15" minimum="3" />
</h:inputSecret>
<h:message for="password" /><br />
<h:commandButton id="submit" action="#{LoginBean.login}" value="#{Message.login_button}" />
</h:form>
</f:view>