Magazine
 
Integrating JSF, Spring and Hibernate
 
border=”0" cellspacing=”2" cellpadding=”0">
<h:outputText value=”User Name”
styleClass=”style2"/>
<h:panelGroup>
<h:inputText id=”userName”
value=”#{Bean.userName}”
required=”true” size=”27" />
<f:verbatim><br/></f:verbatim>
<h:message for=”userName”
styleClass=”errors”/>
</h:panelGroup>
<h:outputText value=”Password”
styleClass=”style2"/>
<h:panelGroup>
<h:inputSecret id=”Password”
value=”#{Bean.pwd}”
size=”27" redisplay=”true” required=”true”/>
<f:verbatim><br/></f:verbatim>
<h:message for=”Password”
styleClass=”errors” />
</h:panelGroup>
<h:outputText value=”Confirm Password”
styleClass=”style2"/>
<h:panelGroup>
<h:inputSecret id=”confirmPassword”
value=”#{Bean.confPwd}” size=”27"
redisplay=”true” required=”true”/>
<f:verbatim><br/></f:verbatim>
<h:message for=”confirmPassword”
styleClass=”errors” />
</h:panelGroup>
<h:outputText value=”Email”
styleClass=”style2"/>
<h:panelGroup>
<h:inputText id=”email”
value=”#{Bean.email}” size=”27"
required=”true”/>
<f:verbatim><br/></f:verbatim>
<h:message
for=”email” styleClass=”errors” />
</h:panelGroup>
<h:outputText
value=”Address” styleClass=”style2"/>
<h:panelGroup>
<h:inputText
id=”address” value=”#{Bean.address}”
size=”27"
required=”true”/>
<f:verbatim><br/
></f:verbatim>
<h:message
for=”address” styleClass=”errors” />

 

</h:panelGroup>
<h:outputText value=” “/>
<h:commandButton
value=”sub” image=”images/
submit_button.gif”
action=”#{Bean.register}”/>
</h:panelGrid>
</h:panelGroup>
</h:panelGrid>
</h:form>
</center>
</body>
</html>
</f:view>

Welcome page:

If the user enters the correct information in all the fields then user is informed for the successful registration in the next page.

welcome.jsp :

This is the code for the above page. This is also a simple page in which only string for successful registration has been shown.

<%@ 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”%>
<f:view>
<html>
<meta http-equiv=”Content-Type”
content=”text/html; charset=iso-8859-1">
<head>
<title>Welcome</title>

Jan 2008 | Java Jazz Up |63
previous
index
next
 
View All Topics
All Pages of this Issue
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,

30
, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53 , 54, 55, 56, 57,

58
, 59, 60, 61, 62, 63 , 64, 65 , 66 , 67 , 68 , 69 , 70 , 71 , 72 , 73 , 74 , 75 , 76 , 77 , 78 , 79 , 80 , 81 , 82 ,

83, 84 , 85 , 86, 87 , 88, 89 , 90 , 91 , 92 , 93 , 94 , 95 , 96 , 97 , 98 , 99 , 100 , 101 , 102 , 103, 104 , 105 ,

106, 107,

Download PDF