Skip site navigation (1) Skip section navigation (2)

Re: How to connect applet to different SQL server.

From: "Ed Gomolka" <egomolka(at)gyldan(dot)com>
To: pgsql-novice <pgsql-novice(at)postgreSQL(dot)org>
Subject: Re: How to connect applet to different SQL server.
Date: 2000-08-18 03:00:36
Message-ID: 00081722180400.00906@gomolka (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
On Thu, 17 Aug 2000, Stuart Urban wrote:
> Doug,
> I have used Java for a while, although I am not extremely familiar with
> Applets.  Recently, however, I have set up a database server(using an
> applet and in an application) for a Java project using PostgreSQL.  It
> seems to me that applets have a lot of trouble accessing files on other
> machines no matter what the situation.  The way that I was able to achieve
> the server functionality was to use Java RMI.  You would need to set up a
> set of objects on the machine with the database according to the standard
> RMI structure and then set up client classes on the machine serving the
> applet.  Figuring it out and understanding it can be a little rough, but
> the end product is VERY powerful, and knowing RMI comes in handy.  If you
> have no idea what I am talking about, you may want to go to Sun's web site
> and check out the RMI tutorials.  There should also be books available on
> RMI, and I believe even some on JDBC and RMI used together.  If you find a
> simpler way to do what you need to, jump on it.  If not, however, Remote
> Method Invocation is a way that I know works for sure.  
We went through a similar problem at work recently.
Our first attempt made use of RMI.
We then discovered that Internet Explorer doesn't support RMI. You
can download the RMI classes from Microsoft and add them to the
Microsoft JVM, but that didn't help us, as we have external clients,
who are unlikely to want to do that.

Our second attempt made use of sockets. This works fine unless you
anticipate having clients who sit behind somebody else's
corporate firewall. We found this out the hard way.

Our final solution involved Applet/Servlet communication, using HTTP
tunnelling. We used the Tomcat servlet engine, in concert with Apache,
for testing purposes. You can get it at Look
for the Jakarta project. If you haven't installed Tomcat previously,
you can look forward to a couple of days of "fun" getting it to
install properly. It's a pretty good servlet engine, and it's rapidly
maturing, but the documentation is somewhat weak.

I installed Tomcat myself, but someone else wrote the servlet
code, so I can't give you the full on the code right now.
If you think this is what you need, and require more info, 
remind me on Monday, and I'll dig up some more details
(I'm taking off for a long weekend now).

  Ed Gomolka

In response to

pgsql-novice by date

Next:From: ghaverlaDate: 2000-08-18 19:07:20
Subject: Fourth email on compilining 7.0.2 on Solaris 2.5.1 (fwd)
Previous:From: Chris RyanDate: 2000-08-18 00:42:45
Subject: Re: How to connect applet to different SQL server.

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group