Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Ports

Ports

From: Learning As Much As I Can <jctown_at_nb.sympatico.ca>
Date: 22 Jul 2006 16:16:51 -0700
Message-ID: <1153610211.028681.65390@s13g2000cwa.googlegroups.com>


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



  String queryString = "describe accounting_logs";     // ---- configure this for your site     String username = "system";
    String password = "xxxyyy";
    String url = "jdbc:oracle:thin:@localhost:8080:ORCL"; <---- is this wrong?

%>

    <% // --------------- 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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US