java.util.Connection你的类加入这个包了??
解决方案 »
- 一个List问题
- 如何知道hibernatetemplate中的方法执行成功
- GM老大,我分用光了,再给点。
- 一世界500强面试题
- 怎么让j2ee的项目和代码分离形成软件?
- [求助]请问给Tomcat配置虚拟目录????
- 炒作Java,变味Java,质疑曲歪发展,居然送200+200分没人理
- 我想做一个网上报名系统!!!求教高手指点!!
- 怎样配置jdk才能在jdk下编译 基于struts得 ActionForm bean 呀?
- 学习SUN公司提供的 THE J2EE Tutorial。有些不懂的问题向大家请教 (持续性的)
- 一个关于数据库连接池的问题
- jms发消息 创建 连接时 报的错误 请高手解答
<%@ page contentType="text/html; charset=gb2312"%>
<%@ page import="Photon.test.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.io.*" %>
<%@ page import = "java.util.Collection" %>
<%@ include file="trans.jsp"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head><jsp:useBean id="product" class="java.util.Connection" scope="request" />
<body>
<center>
<h1>????</h1>
<table width=80% border="1" bgcolor="#0099CC">
<tr bgcolor="#009966" bordercolor="#990066">
<td>id</td><td>SerialNumber</td><td>OSA_Number</td><td>ComputerName</td><td>DataTime</td><td>Tester</td><td>Channe_No</td><td>Temperature_C</td><td>Voltage_V</td><td>OpticalPower_dBm</td><td>SeekCode</td><td>Level_dBmV</td><td>CSO_dBc</td><td>CTB_dBc</td><td>CNR_dBc</td><td>Ext1</td>
</tr>
<%Iterator it = product.iterator();
while(it.hasNext())
{
Table2 temp = (Table2)it.next();
out.println("<tr bordercolor=#990066>");
out.println("<td>"+temp.getId()+"</td>");
out.println("<td>"+temp.getTable2SerialNumber()+"</td>");
try
{
out.println("<td>"+trans(temp.getOSA_Number())+"</td>");
out.println("<td>"+trans(temp.getProducer())+"</td>");
out.println("<td>"+trans(temp.getDescription())+"</td>");
}
catch(Exception e)
{}
out.println("</tr>");
}%>
</table>
<a href="Photon_hl.html">??</a>
</center>
</body>
</html>
这个是我的JSP代码
把这个去掉怎么样
严重: Error compiling file: /C:/Program Files/Apache Software Foundation/Tomcat 5.0/work/Catalina/localhost/Photon_2//org/apache/jsp\search_jsp.java [javac] Compiling 1 source fileC:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\Photon_2\org\apache\jsp\search_jsp.java:87: cannot resolve symbol
symbol : class Connection
location: package util
java.util.Connection product = null;
^
C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\Photon_2\org\apache\jsp\search_jsp.java:89: cannot resolve symbol
symbol : class Connection
location: package util
product = (java.util.Connection) _jspx_page_context.getAttribute("product", PageContext.REQUEST_SCOPE);
^
2 errors
HTTP Status 500 - --------------------------------------------------------------------------------type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception javax.servlet.ServletException: bean product not found within scope
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.search_jsp._jspService(search_jsp.java:136)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause java.lang.InstantiationException: bean product not found within scope
org.apache.jsp.search_jsp._jspService(search_jsp.java:91)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.