This section of the chapter shows how to create an HTML form with a JSP and process it. As discussed earlier in this chapter, there are two types of architecture we can follow: Model 1 or Model 2. This example uses Model 1 architecture. The target of our request will be another JSP. The code below provides a login mechanism for an application:
<%@ page contentType="text/html;charset=windows-1252"%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>TUSC JSP Login Page</title> </head> <body> <% import the page header %> <%@ include file="header.jsp" %> <h1>JSP Login Page Example</h1> <hr width="1024" align="left"> <% if the user has submitted the form create a new UserBean object in the session scope %> <c:if test="${param.submit ==