How can I choose where the error message from the validator required appear?
The error message is now displayed at the bottom of my page but I want it next to my inputbox.
<p>Firstname: <h:inputText value="#{userBean.firstname}" required="true"/></p>
<p>Lastname: <h:inputText value="#{userBean.lastname}" required="true"/></p>
Those appearing at the bottom are actually unhandled messages which will only appear when the
javax.faces.PROJECT_STAGEis been set toDevelopmentinweb.xml.You need a
<h:message>to declare the location where the message should be shown. Further, you also need a<h:outputLabel>to represent the labels (which has semantic and usability advantages).Here’s the complete set: