Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / January 2006

Tip: Looking for answers? Try searching our database.

Servlets, JDBC Oracle Connection Mode

Thread view: 
vpol - 25 Jan 2006 12:55 GMT
Hi all.

I'm actually new to Java and JDBC, but i'm a good learner.

I need to write a servlet, that interacts with Oracle database, using
JDBC. Web-server, running Tomcat is not the same as Database Server
(I've read that it is important for driver mode).

What mode (connection string) should i use to make my connection
working. Also, if needed, please tell what should i change|configure in
database to make it working.

Thanks in advance.
Robert Klemme - 25 Jan 2006 13:54 GMT
> Hi all.
>
[quoted text clipped - 3 lines]
> JDBC. Web-server, running Tomcat is not the same as Database Server
> (I've read that it is important for driver mode).

You then need a signed applet.  Otherwise you're only able to connect to
the server the applet was loaded from.  However, I generally recommend to
not access databases directly from an applet.  I'd create a servlet as
backend that handles the DB connection stuff.  That way you don't need to
sign the applet and also you can optimize the protocol between applet and
servlet.  For communication you could use RMI over HTTP or plain HTTP.
Depends on what you do.

Kind regards

   robert
joeNOSPAM@BEA.com - 25 Jan 2006 15:28 GMT
Hey Robert. He's not talking about an applet, he's talking about
a servlet. He's also probably talking about a homework assignment,
so probably better to let him RTFMaterial.
Robert Klemme - 25 Jan 2006 15:37 GMT
> Hey Robert. He's not talking about an applet, he's talking about
> a servlet. He's also probably talking about a homework assignment,
> so probably better to let him RTFMaterial.

Aaaargh!  I should clean my glasses.  Joe, thanks for the heads up!

this.mute();

   robert
Juha Laiho - 26 Jan 2006 18:26 GMT
"vpol" <vpolukcht@gmail.com> said:
>I'm actually new to Java and JDBC, but i'm a good learner.
>
>I need to write a servlet, that interacts with Oracle database, using
>JDBC. Web-server, running Tomcat is not the same as Database Server
>(I've read that it is important for driver mode).

IIRC, Tomcat documentation does have an example for JDBC setup for
Oracle. Details have changed with Tomcat versions, so be sure you
look at the documentation for the correct version.

Oracle also has documentation on their jdbc: URL formats; see
http://otn.oracle.com/ (registration required).

>What mode (connection string) should i use to make my connection
>working. Also, if needed, please tell what should i change|configure in
>database to make it working.

Oracle TNS listener process (tnslsnr) needs to be running and
configured - but this tends to be, as the same is required for any
Oracle database use over the network.
Signature

Wolf  a.k.a.  Juha Laiho     Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
        PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.