Java Reference
In-Depth Information
}
return "created";
}
}
Adding JSF page navigation
All of the JSF pages navigate to a JSF page created.jsp , which displays a message
to indicate that the database has been updated if an error is not generated in creating
and persisting an entity. The created.jsp JSF page is listed as follows:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<f:view>
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=windows-1252"/>
<title>created</title>
</head>
<body>
<h:form><%out.println("Created"); %></h:form>
</body>
</html>
</f:view>
And if an error is generated, the JSF pages navigate to a JSF page notcreated.jsp ,
which is listed as follows:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<f:view>
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=windows-1252"/>
<title>notcreated</title>
</head>
<body>
<h:form><%out.println("Not created"); %></h:form>
</body>
</html>
</f:view>
 
Search WWH ::




Custom Search