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.
> 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
"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)