这段程序哪错了? JSP+TOMCAT+MYSQL环境ECLIPSE

来源:百度知道 编辑:UC知道 时间:2024/09/23 14:25:48
<%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="java.sql.*"%>

<html>
<head>
<title>查询</title>
</head>

<body>
<%
while(session.getAttribute("roleno"))
{
if(request.getParameter("name")==null)
{
%>
<form action="" method="post" id="form1" name="form1">
<p align="center"><span class="STYLE4">输入你要查询的资料</span>    
<label>
<input type="text" name="name" id="name">
</label>
</p>
<p align="center">
<label>
<input type="submit" name="seek" value="模糊查询">
</label>
</p>
&l

意思叫你写
try{
}
catch{
}

捕捉异常啊。

<%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="java.sql.*"%>

<html>
<head>
<title>查询</title>
</head>

<body>
<%
while(session.getAttribute("roleno"))
{
if(request.getParameter("name")==null)
{
%>
<form action="" method="post" id="form1" name="form1">
<p align="center"><span class="STYLE4">输入你要查询的资料</span>
<label>
<input type="text" name="name" id="name">
</label>
</p>
<p align="center">
<label>
<input type="submit" name="seek" value="模糊查询">
</label>
<