First look at the following JSF pages:
<%...@ page language= "java" pageencoding= "UTF-8"%>
<%...@ taglib uri= "http://java.sun.com/jsf/html" prefix= "H"%>
<%...@ taglib uri= "Http://java.sun.com/jsf/core" prefix= "F"%>
<title>my JSF ' login.jsp ' starting page</title>
<script type= "Text/javascript" ....
function IsEmpty () ... {
var username = document.getElementById ("Formlogin:txtusername"). Value;
var password = document.getElementById ("Formlogin:txtpassword"). Value;
if (username = = "") ... {
Alert ("Give me the user name!") ");
document.getElementById ("Formlogin:txtusername"). focus ();
return false;
}
if (password = = "") ... {
Alert ("Do not lose the password you login to a shovel!" ");
document.getElementById ("Formlogin:txtpassword"). focus ();
return false;
}
}
</script>
<body>
<center>
<f:view>
<div id= "Input" >
styleclass= "FormText"/>
<br>