日期:2014-05-18  浏览次数:20678 次

关于如何在JSP页面内传递参数请教
我想实现JSP一个页面内传递参数,页面分为上部分与下部分;
  下部分是A,B,C,D实物的小图,比如,当点A时,上部分会从ACCESS数据库中调用出A的详细信息(A,B,C小图也是由ACCESS中调用出来的,运行决报错,请多多指教。。

程序如下:
<%@   page   contentType= "text/html;   charset=gb2312 "   language= "java "   import= "java.sql.* "   errorPage= " "   %>
<html   xmlns= "http://www.w3.org/1999/xhtml ">
<head>
<meta   http-equiv= "Content-Type "   content= "text/html;   charset=gb2312 "   />
<title> 无标题文档 </title>
<link   href= "16.css "   rel= "stylesheet "   type= "text/css "   />
</head>

<body>
<%
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver ");   //载入驱动程序类别
Connection   con   =   DriverManager.getConnection( "jdbc:odbc:jspdata ");   //建立数据库链接,jspdata为ODBC数据源名称
//建立Statement对象
Statement   stmt   =   con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_READ_ONLY);
ResultSet   rs   =   stmt.executeQuery( "select   *   from   watch ");   //建立ResultSet(结果集)对象,并执行SQL语句
%>
<div   id= "container ">
<div   id= "left ">
<div   id= "logo "> </div>
<div   id= "nav ">
<div   id= "menu ">
<ul>
<li> <a   href= "# "> <span   class= "a "> Home </span> </a> </li>
<li> <a   href= "# "> <span   class= "a "> Message   grom   CEO </span> </a> </li>
<li> <a   href= "# "> <span   class= "a "> Background </span> </a> </li>
<li> <a   href= "# "> <span   class= "a "> Brands </span> </a> </li>
<li> <a   href= "# "> <span   class= "a "> Watch   making   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;expertise </span> </a> </li>
<li> <a   href= "# "> <span   class= "a "> Values </span> </a> </li>
<li> <a   href= "# "> <span   class= "a "> Store </span> </a> </li>
<li> <a   href= "# "> <span   class= "a "> Contact </span> </a> </li>
</ul>
</div>


</div>
</div>
<div   id= "right ">
<div   id= "right_top ">
<div   id= "watch_logo "> <img   src= "images/TRDC_new-logo-small.gif "   width= "316 "   height= "65 "   /> </div>
<%
  String   picId   = " ";
  if(request.getParameters( "nid ")   !=null)
  {
    picId   =   request.getParameters( "nid ");  
  }
 
%>  


<div   id= "watch "   > <img   src= "images/Fuego-orange21888-10-big.gif "   width= "