954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Connecting JSP, Tomcat, Oracle 10g

Hi all! I really hope someone can do a huge favor and help my group out!

We are students and we are trying to complete an assignment to create an interface page using jsp and oracle.

Using XP pro we have installed all of the above.
We then configured apache http server to listen on port 8080. So http://localhost:8080/ returns the apache page. Oracle has been installed as http://localhost:8081/apex (this brings up the login page)

In Oracle we have created a user ge password ge and made a table with 'first_name' and 'last_name' just for testing purposes. That's it.

Now, we have been trying to create a jsp page that will connect to Oracle with no luck so far.

Now the tricky stuff. We downloaded the jdbc-odbc bridge. We went into control panel>>admin>>odbc connections and made a SYSTEM DSN called ge2. (What should the configuration be right here???).

Now, since we are using Dreamweaver 8 on my test_1.jsp page I clicked the + sign (create a new connection) and here I must tell it what to use. Ex: Oracle Thin, JDBC-ODBC, etc. We selected the JDBC-ODBC and then we have to fill in the following properties...

Battery died. On a Mac now. Will edit later today.

Now, I have read that creating the database connection in the page is and old way and is now considered to be Wrong! Instead you must create a servelet, whatever that is, and connect through that.

If you guys need more detail or anything like that just let me know.

We appreciate it!

weevil
Newbie Poster
4 posts since Dec 2007
Reputation Points: 10
Solved Threads: 0
 



What's your name?

weevil
Newbie Poster
4 posts since Dec 2007
Reputation Points: 10
Solved Threads: 0
 

hi,

if you are using oracle ver greater than 9 then
oracle driver shall be

Class.forName("oracle.jdbc.OracleDriver");

I tried with oracle 10g express edition
with oracle xe driver it worked for me.

you shall change your connection string and driver as follows:


Class.forName("oracle.jdbc.OracleDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:ge","GE","ge");

im using Tomcat 5.5.
hope u too using tomcat.

khiz
Newbie Poster
1 post since Jun 2008
Reputation Points: 10
Solved Threads: 0
 

well, ANY version of Oracle released in the last decade has JDBC drivers.
Using the bridge driver is ALWAYS wrong! ALWAYS!

And so is doing database access from JSP.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You