Excuse me,
I use JBuilder 4, and met the problerm below
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:537)
at java.sql.DriverManager.getConnection(DriverManager.java:177)
at
src._0002fsrc_0002ftestDBWithoutBean_0002ejsptestDBWithoutBean_jsp_2._jspSer
vice(_0002fsrc_0002ftestDBWithoutBean_0002ejsptestDBWithoutBean_jsp_2.java:8
0)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
va:174)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
at
com.borland.jbuilder.webserverglue.tomcat.jsp.JspLoaderEcho.service(Unknown
Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:160)
at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
)
at java.lang.Thread.run(Thread.java:484)
-----
My testDBWithoutBean.jsp file is listed below:
<%@ page import="java.awt.*"%>
<%@ page import="java.util.*"%>
<%@ page import="java.sql.*"%>
<%@ page import="java.text.*"%>
<html>
<head>
<title>TestDBBean
</title>
</head>
<body>
<%String sDBDriver = "oracle.jdbc.driver.OracleDriver";
String sConnStr = "jdbc:oracle:thin:@10.1.1.100:1521:ora100" ;
String sSQLStr = "select * from testtab" ;
String ls_bookid ;
String ls_name ;
Connection conn=null;
conn=DriverManager.getConnection(sConnStr,"seg","seg");
Statement stmt=conn.createStatement();
stmt.executeQuery(sSQLStr) ;
ResultSet rs=stmt.executeQuery(sSQLStr);
%>
<hr color="#0000FF">
<table border="1" cellspacing="0" cellpadding="0" BGCOLOR="#ffcc99" >
<tr>
<th>col11</th>
<th>col22</th>
</tr>
<% while(rs.next())
{
%>
<tr bgcolor="#CADAF7">
<td> col11:<%=rs.getString("col11")%></td>
<td> col22: <%=rs.getString("col22")%></td>
</tr>
<%}%>
</table>
</body>
</html>
So, how could I solve this problerm now, I need all your help.
Thanks a lot.
Lancelot
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets