Example JSP Code

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 == 


Oracle Application Server 10g Web Development
Oracle Application Server 10g Web Development (Oracle Press)
ISBN: 0072255110
EAN: 2147483647
Year: 2004
Pages: 192

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net