Magazine
 
Integrating JSF, Spring and Hibernate
 

<link href=”mycss.css” rel=”stylesheet”
type=”text/css”/>
</head>
<body ><center>
<h:form>
<h:panelGrid width=”100%” columns=”1"
border=”0" style=”padding-left:10px;
padding-top:10px; “
styleClass=”top_bg”>
<h:dataTable id=”dt1" border=”0"
cellpadding=”0" cellspacing=”0" var=”ab”>
<h:column>
<f:facet name=”header”>
<h:outputText
value=”RoseIndia” styleClass=”style4"/>
</f:facet>
</h:column>
</h:dataTable>
</h:panelGrid>
<h:panelGrid width=”100%” columns=”1"
border=”0" >
<f:verbatim>&nbsp;</f:verbatim>
<h:outputText value=” “/
><h:outputText value=” “/><h:outputText
value=” “/>
</h:panelGrid>
<h:outputText value=”Registration is
successful.” style=”color:green; fontweight:
bold”/>
</h:form>
</center>
</body>
</html>
</f:view>

Configuration Files :
Information about message bundle, backing bean, navigation rules are to be specified in the faces-config.xml file. This file has been modified like below:

faces-config.xml :

<?xml version=”1.0"?>
<!DOCTYPE faces-config PUBLIC
“-//Sun Microsystems, Inc.//DTD JavaServer
Faces Config 1.0//EN”
“http://java.sun.com/dtd/webfacesconfig_
1_0.dtd” >

 

<faces-config>
<application>
<locale-config>
<default-locale>en</default-locale>
</locale-config>
<messagebundle>
net.roseindia.web.ui.messages</
message-bundle>
</application>
<managed-bean>
<managed-bean-name>Bean</managedbean-
name>
<managed-beanclass>
net.roseindia.web.ui.Bean</managedbean-
class>
<managed-bean-scope>session</
managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>CheckValidUser</
managed-bean-name>
<managed-beanclass>
net.roseindia.web.ui.CheckValidUser
</managed-bean-class>
<managed-bean-scope>session</
managed-bean-scope>
</managed-bean>
<navigation-rule>
<from-view-id>/pages/login.jsp</fromview-
id>
<navigation-case>
<from-outcome>reg</fromoutcome>
<to-view-id>/pages/registration.jsp</
to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>success</fromoutcome>
<to-view-id>/pages/
successLogin.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>failure</fromoutcome>
<to-view-id>/pages/login.jsp</toview-
id>

Jan 2008 | Java Jazz Up |64
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