<%@ page contentType="text/html;Charset=GB2312"%> <%@ page import="java.sql.*" %>
<%@pageimport="database.p.*"%><jsp:useBeanid="add"class="database.p.JPing"scope="requ...
<%@ page import="database.p.*" %>
<jsp:useBean id="add" class="database.p.JPing" scope="request" />
<html>
<head>
<title>教员评分</title>
</head>
<body>
<%String id=(String)session.getAttribute("i");
String course=(String)session.getAttribute("c");
%>
<form id="form1" name="form1" method="post" action=" ">
<table width="200" border="1">
<tr>
<td>教员姓名</td>
<td>教授科目</td>
<td>评分</td>
</tr>
<tr>
<td><%=id%></td>
<td><%=course%></td>
<td><input type="text" name="score" /></td>
</tr>
</table>
<p>
<input type="submit" name="Submit" value="提交" />
<input type="reset" name="Submit1" value="重置" />
</p>
</form>
<%String score=request.getParameter("score");
int s=Integer.parseInt(score);%>
<% Connection con;
Statement sql;
ResultSet rs;
try{ Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
}
catch(ClassNotFoundException e)
{ out.print(e);
}
try { con=DriverManager.getConnection ("jdbc:sqlserver://127.0.0.1:1433;databaseName=Adm;user=sa;password=123456");
sql=con.createStatement();
rs=sql.executeQuery("SELECT * FROM jiaoping WHERE id='"+id+"'");
String ss=rs.getString("score");
String n=rs.getString("num");
int sc=Integer.parseInt(ss);
int nu=Integer.parseInt(n);
sc=sc+s;
nu++;
%>
<jsp:setProperty name= "add" property="score" value="<%=sc%>"/>
<jsp:setProperty name= "add" property="num" value="<%=nu%>"/>
<%
con.close();
}catch(SQLException e)
{ out.print(e);
}
%>
<jsp:setProperty name= "add" property="id" value="<%=id%>"/>
<jsp:getProperty name= "add" property="updateMessage" />
</body>
</html>
org.apache.jasper.JasperException: An exception occurred processing JSP page /pingfen/jiaoyuanpingfen.jsp at line 32
29: </p>
30: </form>
31: <%String score=request.getParameter("score");
32: int s=Integer.parseInt(score);%>
33: <% Connection con;
34: Statement sql;
35: ResultSet rs; 展开
<jsp:useBean id="add" class="database.p.JPing" scope="request" />
<html>
<head>
<title>教员评分</title>
</head>
<body>
<%String id=(String)session.getAttribute("i");
String course=(String)session.getAttribute("c");
%>
<form id="form1" name="form1" method="post" action=" ">
<table width="200" border="1">
<tr>
<td>教员姓名</td>
<td>教授科目</td>
<td>评分</td>
</tr>
<tr>
<td><%=id%></td>
<td><%=course%></td>
<td><input type="text" name="score" /></td>
</tr>
</table>
<p>
<input type="submit" name="Submit" value="提交" />
<input type="reset" name="Submit1" value="重置" />
</p>
</form>
<%String score=request.getParameter("score");
int s=Integer.parseInt(score);%>
<% Connection con;
Statement sql;
ResultSet rs;
try{ Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
}
catch(ClassNotFoundException e)
{ out.print(e);
}
try { con=DriverManager.getConnection ("jdbc:sqlserver://127.0.0.1:1433;databaseName=Adm;user=sa;password=123456");
sql=con.createStatement();
rs=sql.executeQuery("SELECT * FROM jiaoping WHERE id='"+id+"'");
String ss=rs.getString("score");
String n=rs.getString("num");
int sc=Integer.parseInt(ss);
int nu=Integer.parseInt(n);
sc=sc+s;
nu++;
%>
<jsp:setProperty name= "add" property="score" value="<%=sc%>"/>
<jsp:setProperty name= "add" property="num" value="<%=nu%>"/>
<%
con.close();
}catch(SQLException e)
{ out.print(e);
}
%>
<jsp:setProperty name= "add" property="id" value="<%=id%>"/>
<jsp:getProperty name= "add" property="updateMessage" />
</body>
</html>
org.apache.jasper.JasperException: An exception occurred processing JSP page /pingfen/jiaoyuanpingfen.jsp at line 32
29: </p>
30: </form>
31: <%String score=request.getParameter("score");
32: int s=Integer.parseInt(score);%>
33: <% Connection con;
34: Statement sql;
35: ResultSet rs; 展开
若以下回答无法解决问题,邀请你更新回答
2016-05-20
展开全部
先说出现了什么问题吧 。。。。。。。。。。。。。运行才清楚
追问
他一直显示int s=Integer.parseInt(score);这句有问题
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询