choose.jsp(向issuelist.jsp发送表单,此页面编译正常)
----------------------------------------------------
<%Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn=DriverManager.getConnection("jdbc:odbc:boc");
Statement stmt=conn.createStatement();
String sql="select * from issue";
ResultSet rs=stmt.executeQuery(sql);
while(rs.next()) {%>
<tr>
<td><span class="STYLE5"><%=rs.getString("业务号")%></span></td>
<td><span class="STYLE5"><%=rs.getString("业务名称")%></span></td>
<td><span class="STYLE5"><%=rs.getString("提供服务时间")%></span></td>
</tr>
<%}%>
</table>
<p> </p>
<p class="STYLE7">请选择您所需的服务</p>
<form id="style" name="style" method="post" action="issuelist.jsp">
<label><span class="STYLE8">私人现金
<input type="radio" name="isname" value="私人现金" />
</span></label>
<span class="STYLE8">
<label>私人非现金
<input type="radio" name="isname" value="私人非现金" />
</label>
<label>企业现金
<input type="radio" name="isname" value="企业现金" />
</label>
<label>企业非现金
<input type="radio" name="isname" value="企业非现金" />
</label>
<label>VIP
<input type="radio" name="isname" value="VIP" />
</label>
issuelist.jsp(此页面出错信息在代码后)
--------------------------------------------------------------
<%String s = request.getParameter("isname");%>
<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn=DriverManager.getConnection("jdbc:odbc:boc");
Statement stmt=conn.createStatement();
String sql="select * from condition where 业务名称=s";
ResultSet rs=stmt.executeQuery(sql);
while(rs.next()) {%>
<tr>
<td><%=rs.getString("预约码")%></td>
<td><%=rs.getString("业务号")%></td>
<td><%=rs.getString("业务名称")%></td>
<td><%=rs.getString("提供服务时间")%></td>
<td><%=rs.getString("已被预约")%></td>
</tr>
<%}%>
</table>错误信息
---------------------------------------------
An error occurred at line: 18 in the jsp file: /issuelist.jspGenerated servlet error:
[javac] Compiling 1 source fileC:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\issuelist_jsp.java:81: cannot resolve symbol
symbol : class Connection
location: class org.apache.jsp.issuelist_jspAn error occurred at line: 18 in the jsp file: /issuelist.jspGenerated servlet error:
Connection conn=DriverManager.getConnection("jdbc:odbc:boc");
^An error occurred at line: 18 in the jsp file: /issuelist.jspGenerated servlet error:
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\issuelist_jsp.java:81: cannot resolve symbol
symbol : variable DriverManager
location: class org.apache.jsp.issuelist_jspAn error occurred at line: 18 in the jsp file: /issuelist.jspGenerated servlet error:
Connection conn=DriverManager.getConnection("jdbc:odbc:boc");
^An error occurred at line: 18 in the jsp file: /issuelist.jspGenerated servlet error:
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\issuelist_jsp.java:82: cannot resolve symbol
symbol : class Statement
location: class org.apache.jsp.issuelist_jsp
Statement stmt=conn.createStatement();
^An error occurred at line: 18 in the jsp file: /issuelist.jspGenerated servlet error:
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\issuelist_jsp.java:84: cannot resolve symbol
symbol : class ResultSet
location: class org.apache.jsp.issuelist_jsp
ResultSet rs=stmt.executeQuery(sql);
----------------------------------------------------
<%Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn=DriverManager.getConnection("jdbc:odbc:boc");
Statement stmt=conn.createStatement();
String sql="select * from issue";
ResultSet rs=stmt.executeQuery(sql);
while(rs.next()) {%>
<tr>
<td><span class="STYLE5"><%=rs.getString("业务号")%></span></td>
<td><span class="STYLE5"><%=rs.getString("业务名称")%></span></td>
<td><span class="STYLE5"><%=rs.getString("提供服务时间")%></span></td>
</tr>
<%}%>
</table>
<p> </p>
<p class="STYLE7">请选择您所需的服务</p>
<form id="style" name="style" method="post" action="issuelist.jsp">
<label><span class="STYLE8">私人现金
<input type="radio" name="isname" value="私人现金" />
</span></label>
<span class="STYLE8">
<label>私人非现金
<input type="radio" name="isname" value="私人非现金" />
</label>
<label>企业现金
<input type="radio" name="isname" value="企业现金" />
</label>
<label>企业非现金
<input type="radio" name="isname" value="企业非现金" />
</label>
<label>VIP
<input type="radio" name="isname" value="VIP" />
</label>
issuelist.jsp(此页面出错信息在代码后)
--------------------------------------------------------------
<%String s = request.getParameter("isname");%>
<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn=DriverManager.getConnection("jdbc:odbc:boc");
Statement stmt=conn.createStatement();
String sql="select * from condition where 业务名称=s";
ResultSet rs=stmt.executeQuery(sql);
while(rs.next()) {%>
<tr>
<td><%=rs.getString("预约码")%></td>
<td><%=rs.getString("业务号")%></td>
<td><%=rs.getString("业务名称")%></td>
<td><%=rs.getString("提供服务时间")%></td>
<td><%=rs.getString("已被预约")%></td>
</tr>
<%}%>
</table>错误信息
---------------------------------------------
An error occurred at line: 18 in the jsp file: /issuelist.jspGenerated servlet error:
[javac] Compiling 1 source fileC:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\issuelist_jsp.java:81: cannot resolve symbol
symbol : class Connection
location: class org.apache.jsp.issuelist_jspAn error occurred at line: 18 in the jsp file: /issuelist.jspGenerated servlet error:
Connection conn=DriverManager.getConnection("jdbc:odbc:boc");
^An error occurred at line: 18 in the jsp file: /issuelist.jspGenerated servlet error:
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\issuelist_jsp.java:81: cannot resolve symbol
symbol : variable DriverManager
location: class org.apache.jsp.issuelist_jspAn error occurred at line: 18 in the jsp file: /issuelist.jspGenerated servlet error:
Connection conn=DriverManager.getConnection("jdbc:odbc:boc");
^An error occurred at line: 18 in the jsp file: /issuelist.jspGenerated servlet error:
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\issuelist_jsp.java:82: cannot resolve symbol
symbol : class Statement
location: class org.apache.jsp.issuelist_jsp
Statement stmt=conn.createStatement();
^An error occurred at line: 18 in the jsp file: /issuelist.jspGenerated servlet error:
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\issuelist_jsp.java:84: cannot resolve symbol
symbol : class ResultSet
location: class org.apache.jsp.issuelist_jsp
ResultSet rs=stmt.executeQuery(sql);
解决方案 »
- eclipse上启动的tomcat无法热部署?
- jsp如何防止用户直接输入其他页面的URL,跳过登陆界面呢?
- Apache Rewrite 如何重定向
- jsp中连接文件打开出现乱码,而有些又不会?
- 提示错误: javax.servletr.jsp.tagext, javax.servlet.jsp 包找不到, 在哪找这些包?
- 如何把servlet的参数传到bean里面去啊!???????
- 300分请教一个问题!一个APPLET程序的实现!
- jsp中如何调用指定的dll中的函数?望多多指教!
- 超级郁闷:为什么用了JavaBean之后,老是出错呢?
- 高分送出
- tomcat的简单设置
- 怎样在一个jsp页面同时上传文件和传递参数啊?
--------------------------------------------------------------
<%String s = request.getParameter("isname");%>
<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn=DriverManager.getConnection("jdbc:odbc:boc");
Statement stmt=conn.createStatement();
String sql="select * from condition where 业务名称=s";
ResultSet rs=stmt.executeQuery(sql);
while(rs.next()) {%>
<tr>
<td><%=rs.getString("预约码")%></td>
<td><%=rs.getString("业务号")%></td>
<td><%=rs.getString("业务名称")%></td>
<td><%=rs.getString("提供服务时间")%></td>
<td><%=rs.getString("已被预约")%></td>
</tr>
<%}%>
</table>
这个页面引入java.sql.*没有?
<%@ page import="java.sql.Connection,java.sql.Statement,java.sql.ResultSet" %>