这是我的代码
总出现java.lang.NumberFormatException: null 异常
late_edit.jsp
<%@ page contentType= "text/html; charset=gb2312 " language= "java " import= "java.sql.* " %>
<%
Connection conn=null;
try
{
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver ").newInstance();
conn= DriverManager.getConnection( "jdbc:odbc:58bo ");
}catch(Exception e)
{
e.printStackTrace();
out.println( "发生错误异常: " + e.getMessage());
}
Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
%>
<html>
<head>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 ">
<title> 无标题文档 </title>
<link href= "../Css/style.css " rel= "stylesheet " type= "text/css ">
</head>
<%
String del_id=request.getParameter( "del_id ");
if(del_id!= " ")
{del_id=Integer.parseInt(del_id);stmt.executeUpdate( "delete from late where 自动编号= ' "+del_id+ " ' ");
response.sendRedirect( "late_list.jsp ");}
%>
<%
String late_second=request.getParameter( "late_second ");
String edit_id_ok=request.getParameter( "edit_id_ok ");
if(late_second!= " ")
{
stmt.executeUpdate( "update late set 栏目子类= ' "+late_second+ " ' where 自动编号= ' "+edit_id_ok+ " ' ");
stmt.executeUpdate( "update info set 栏目子类= ' "+late_second+ " ' where 栏目子类= ' "+request.getParameter( "late_hidden ")+ " ' ");
response.sendRedirect( "late_list.jsp ");
}
%>
<body> <%String id=request.getParameter( "id ");%>
<table border= "0 " width= "100% " cellspacing= "0 " cellpadding= "3 " class= "small ">
<tr>
<td class= "title1 "> <img src= "../Images/icon/score.gif " WIDTH= "16 " HEIGHT= "16 " align= "absmiddle "> <b>
</b> <b> 编辑栏目 </b> </td>
</tr>
</table>
<hr class= "hr1 " >
<form name= "thisform " method= "post " action= "late_edit.jsp?edit_id_ok= <%=id%> ">
<table width= "80% " border= "0 " align= "center " cellpadding= "3 " cellspacing= "1 " bgcolor= "#000000 " class= "small ">
<tr>
<td width= "80 " nowrap class= "TableHeader "> 栏目大类 </td>
<td nowrap class= "TableHeader "> 栏目子类 </td>
<td nowrap class= "TableHeader "> 操作 </td>
</tr>
<%
ResultSet rs=stmt.executeQuery( "select 栏目大类,栏目子类 from late where 自动编号= ' "+id+ " ' ");
while(rs.next()){
%>
<tr class= "TableLine1 ">
<td align= "center "> <%=rs.getString( "栏目大类 ")%> </td>
<td align= "center ">
<input name= "late_hidden " type= "hidden " value= " <%=rs.getString( "栏目子类 ")%> "> <input name= "late_second " type= "text " class= "BigInput " value= " <%=rs.getString( "栏目子类 ")%> " size= "20 " maxlength= "20 "> </td>