jsp添加数据库
我做的JSP网页,当向Mysql数据库中添加信息时,老是出现添加失败的情况,总不能顺利加上,高手帮我看看啊,做毕设很着急啊
这段是添加页面的程序
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*"
errorPage="" %>
<jsp:useBean id="showTime" scope="request" class="com.ShowTime"/>
<jsp:useBean id="chinese" scope="request" class="com.Chinese"/>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>刀具信息</title>
</head>
<body><jsp:include page="tom.jsp"/>
<table width="761" height="309" border="0" align="center" cellpadding="0" cellspacing="0" background="image/topThree_Back.jpg">
<tr>
<td width="31"> </td>
<td width="698" align="center" valign="top"><br> <table width="650" border="0" cellspacing="0">
<tr>
<td height="58" bgcolor="#FFFFFF" align="center"><br> <b><font size="+1">添加刀具信息</font></b>
<form name="form" method="post" action="dealWith.jsp?method=2">
<table width="527" border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bordercolordark="#DEDFDE" bordercolorlight="#FFFFFF">
<tr align="center" bgcolor="#FFFFFF">
<td height="40" bgcolor="#FFFFFF">刀具Id:</td>
<td bgcolor="#FFFFFF"><input name="machineId" type="text" size="50"></td>
</tr>
<tr align="center" bgcolor="#FFFFFF">
<td height="40" bgcolor="#FFFFFF">刀具编码:</td>
<td bgcolor="#FFFFFF"><input name="machineCode" type="text" size="50"></td>
</tr>
<tr align="center" bgcolor="#FFFFFF">
<td width="130" height="40" bgcolor="#FFFFFF">刀具厂家:</td>
<td width="391" bgcolor="#FFFFFF"><input name="machineCompany" type="text" size="50"></td>
</tr>
<tr align="center" bgcolor="#FFFFFF">
<td height="40" bgcolor="#FFFFFF">创建时间:</td>
<td bgcolor="#FFFFFF"> <%=showTime.currentlyTime()%><input name="machineCompany" type="hidden" value="<%=showTime.currentlyTime()%>"></td>
</tr>
</table>
<br>
<input type="submit" name="Submit" value="添加">
<input type="reset" name="Submit2" value="重置">
<input type="button" name="Submit3" value="返回" onClick="javascript:w