我在jsp页面中有这个表格 -
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" href="./Styles/Site.css" type="text/css" />
<title>Create new customer</title>
</head>
<body>
<fieldset>
<legend>Create new customer</legend>
<form action="CreateCustomerServlet" method="GET">
ID : <input type="text" name="customerId" />
<br />
First Name : <input type="text" name="customerFirstName" />
<br />
Last Name : <input type="text" name="customerLastName" />
<br />
Phone : <input type="text" name="customerPhone" />
<br />
Gender : <input type="radio" name="customerGender" value="Male">
Male <input type="radio" name="customerGender" value="Female">
Female
<br>
Password :<input type="password" size="25" name="customerPassword"><br/>
re-Password :<input type="Password" size="25" name="reCustomerPassword">
<br />
<input type="submit" value="Create customer" />
</form>
</fieldset>
<%
// java section , here I want to control on the texts of the form
%>
</body>
</html>
submit
当按下按钮时,我该怎么做?
编辑: 我会注意,我想在将其发送到 servlet 之前检查 java 部分中的文本。