Java Reference
In-Depth Information
<form action="" method="post">What's your first name? <br />
<input type="text" name="name" /> <br />
<input type="submit" value="Submit" /></form>
Figure 4-7. The index.jsp page providing user input
Now you need to create the JSP page that displays the value submitted by the user.
The code in Listing 4-14 uses the JavaServer Pages Standard Tag Library to display
the name that the user entered in the previous page (Figure 4-8).
Listing 4-14. The test.jsp page
<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
<%@ page isELIgnored="false"%>
<%@taglib prefix="c" uri=""%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="">
Search WWH ::

Custom Search