JSP的商品详细信息问题``急的尿裤子了``郁闷``
各位前辈``我想做一个商品的详细信息页面`点击商品详细信息`自动弹出对应的详细信息!
这个是商品的页面小部分代码: <a href= "hwmsg.jsp?item= <%= id[i] %> " target= "_blank "> [详细] </a> </a> </font> </h4> </td>
点这个详细后然后连接hwmsg.jsp``可是页面始终是空白并抛出一个catch里的 "catch1 "异常!!
这里是hwmsg.jsp的全部代码:
<html>
<body>
<table width= "100% " border= "0 " align= "center " cellpadding= "0 " cellspacing= "1 " style= "margin-bottom: 6 ">
<tr bgcolor= "#FFFFFF ">
<td height= "100 " colspan= "2 " align= "center ">
<div align= "center "> </div>
<table width= "95% " height= "5 " border= "0 " align= "center " cellpadding= "0 " cellspacing= "0 ">
<%
Connection dbcon=null;
String id=request.getParameter( "item "); //图书编号
String author; //作者
String name; //书名
float price; //书价
String discrip; //简介
float hprice; //会员jia
String picture; //图片地址
try
{
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver ");
dbcon=DriverManager.getConnection( "jdbc:odbc:book ", " ", " ");
System.out.println( "Connection established ");
}
catch(
ClassNotFoundException e)
{
System.out.println( "Database driver not found ");
System.out.println(e.toString());
}
catch (Exception e)
{
System.out.println(e.toString());
}
try
{
PreparedStatement s=dbcon.prepareStatement( "select productid,author,name,price,,message,picture from taoqi_product where productid= ' "+id+ " ' ");
ResultSet result=s.executeQuery();
result.next();