Skip to content

Instantly share code, notes, and snippets.

@hakaneroztekin
Last active August 21, 2019 10:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hakaneroztekin/ddfffa8ffa7747c7b5e92c8c1e950ba5 to your computer and use it in GitHub Desktop.
Save hakaneroztekin/ddfffa8ffa7747c7b5e92c8c1e950ba5 to your computer and use it in GitHub Desktop.
// index.xhtml
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<h:head>
<title>User Form</title>
</h:head>
<h:body>
<h:outputText value="Hello world!"/>
<h:form>
<h:outputLabel for="username">User Name</h:outputLabel>
<h:inputText id="username" value="#{user.name}" required="true" requiredMessage="User Name is required" /><br/>
<h:commandButton id="submit-button" value="Submit" action="response.xhtml"/>
</h:form>
</h:body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment