| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Ports
I downloaded and installed the Oracle 10G Express Version on my Windows
XP Home PC. I can use sqlplus to connect to my database and query it.
But I am trying to do the same thing using a JSP.
Without trying to make my first post totally useless, I will try to provide some details... for those who have experience in these areas (JSP and Oracle).
Here is a portion of my jsp
%>
<% // --------------- code for the service method --------------
// Let's see if we got a request
queryString = request.getParameter ("QUERYSTRING");
if ((queryString != "") && (queryString != null)) {
try {
Class.forName("oracle.jdbc.driver.OracleDriver"); <--- or is
this the problem?
// Establish Connection to the database at URL with usename and password
con = DriverManager.getConnection(url, username, password); // out.println ("Ok, connection to the DB is working.");
} catch (Exception e) // (ClassNotFoundException and SQLException)
{
throw(new UnavailableException(this, "Sorry! The Database didn't
load!"));
}
When I execute the JSP (launched under Apache), I get an error message triggered by the UnavailableException. What I am thinking is that either my Class.forName is wrong or my url is wrong (or both). I think that my PORT should be 1521 but I don't know what the database should be... and I can't seem to locate the name for it anywhere.
I am only starting to learn this stuff... the reason I went to Oracle was because that's what we use at work and I wanted to be able to talk the same language.
If anyone can help me I would appreciate it. Received on Sat Jul 22 2006 - 18:16:51 CDT
![]() |
![]() |