In the following steps, you create the login_action.jsp page, which is a nonviewable page that processes the login operation.
To see the code that has been added to login_action.jsp, select the Source tab. The code displayed is similar to the following:
<body>
<%@ page import="java.sql.ResultSet"%><jsp:useBean id="empsbean"
class="hr.DataHandler"
scope="session"/>
<%boolean userIsValid = false;
String host = request.getParameter("host");
String userid = request.getParameter("userid");
String password = request.getParameter("password");
String jdbcUrl = "jdbc:oracle:thin:@" + host + ":1521:ORACLE";
userIsValid = empsbean.authenticateUser(jdbcUrl, userid, password, session);%> <%if(userIsValid){%><jsp:forward page="employees.jsp"/>
<%if (userIsValid){%><jsp:forward page="login.jsp"/><%}%>
</body>