大虾们快来!初级问题,分儿多多!
问题一:
页面q2.jsp传递一个参数到页面q3.jsp
为何:nextname=request.getParameter("name");获得参数正确;而用:
nextname=Session.Getvalue("thename");获得参数却出错?
问题二:
代码如下:
<%@ page import="java.sql.*"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>数据库查询</title>
</head>
<body>
<center>
<%
Connection sqlCon;
Statement sqlStmt;
String strCon; //数据库连接字符串
String strSQL; //SQL语句
String url="jdbc:odbc:MMS";
Class.forName("com.ibm.db2.jdbc.app.DB2Driver");
Connection con=DriverManager.getConnection(url,"admin","789582");
con.close();
%>
<caption>数据库查询网面</caption>
<tr><td>姓名</td><td>电话</td></tr>
</center>
</body>
</html>
报错!密码没有错!不知道错在哪里?请大虾们指点!