请求帮助 为什么出错
我的代码如下<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="Css/Css.css" rel="stylesheet" type="text/css">
<jsp:useBean id="connection" scope="request" class="default package.JDBConnection"/>
<title>把数据库中的记录显示到下拉列表中</title>
</head>
<%!
private String strMDB = "LiteratureDate";
private String[] strkey = {"Author","Title","Keywords","Abstract"};//篇名,作者,摘要,关键字
private String[] strfield= {"ID","Name","Author","Title","Journal","Style12","Pages","Volume","Keywords","Year","Date","Accession Number","Abstract","Notes","URL","Link to PDF","Author Address","Image"};
%>
<body>
<form name = "form1" method = "post">
<select name="key">
<%
for(int i = 0 ; i < strkey.length ; ++i){
%>
<option value=<%=strkey[i]%>><%=strkey[i]%></option>
<%
}
%>
</select>
<input type = "text" name = "keyword" />
<input type = "submit" value = "查询" />
<table width="100%" border="1">
<tr>
<%
for(int i = 0 ; i < strfield.length; ++i){
%>
<td><b><%= strfield[i]%></b></td>
<%
}
%>
</tr>
<%
if(request.getParameter("keyword")!=null){
String sql=null;
ResultSet rs=null;
sql="select * from Sheet1 where "+request.getParameter("key")+"='"+request.getParameter("keyword")+"'";
rs=connection.executeQuery(sql);
try{
while(rs.next()){
%>
<tr>
<%
for(int i = 0 ; i < strfield.length; ++i){
%>
<td><TEXTAREA cols="50" rows="5"><%=rs.getString(strfield[i])%></TEXTAREA></td>
<%
}
%>
</tr>
<%
}
}
catch(Exception e){System.out.print(e.getMessage());}
}
%>
</table>
</form>
</body>
</html>
报错是
Multiple annotations found at this line:
- Syntax error on tokens, GenericType expected instead
- Syntax error on tokens, Name expected instead