Thread: Acces via applets
The bottom line question is can an applet served to a client machine other than the one the postrgres db resides on read that db?
An applet I’ve written and tested on the same box as my database runs fine.
When I try running the applet from another computer on the network I get an error trying to access the database.
Even when I added the ip of that computer to the pg_hba.conf it still didn’t work.
Why does an applet served to the same box as the db work, but when served to another box not work?
Is there a configuration setting I’m missing or is this simply not possible?
The applet has been self signed.using the java’s keytool and jarsigner programs.
I’ve had this same setup working with SQL Server for years now.
Self signed applet reads db on separate box.
What is going on with PostgreSQL?
Sorry for rambling, I’m just so frustrated right now.
Thanks in advance.
Marc
On Apr 11, 3:45 pm, m...@comcast.net ("Marc") wrote: > The bottom line question is can an applet served to a client machine other > than the one the postrgres db resides on read that db? Certainly. But the applet needs to be signed by the distributor, and trusted by the end-user. > Why does an applet served to the same box as the db work, but when served to > another box not work? One reason is this.. If unsigned applets could pull resources off other sites, a lot of developers would be tempted to use them so they could 'hot link' to resources on *other* sites, while pretending to deliver the content from their *own* site. If the user is prompted to 'trust this code', it makes it more obvious to the end user that something beyond a standard applet is happening. As an aside, this is more of a Java problem, than one relating to SQL. I do not generally read this group, so if you wish to pursue the matter, I suggest taking it up on the comp.lang.java.help usenet newsgroup. HTH Andrew T.
On Apr 11, 3:45 pm, m...@comcast.net ("Marc") wrote: .. > The applet has been self signed. .. I did miss that bit on my initial reading, but like I said earlier - best to continue it in a discussion on a Java group. Andrew T.
Marc wrote: what version of PostgreSQL? what version of the jdbc driver? > > The bottom line question is can an applet served to a client machine > other than the one the postrgres db resides on read that db? > I can't see why not. > > An applet I’ve written and tested on the same box as my database runs > fine. > > When I try running the applet from another computer on the network I > get an error trying to access the database. > what error? Turn on appropriate logging for PostgreSQL and then what does the PostgreSQL log show? > > Even when I added the ip of that computer to the pg_hba.conf it still > didn’t work. > did you restart? > > Why does an applet served to the same box as the db work, but when > served to another box not work? > need more/better info. > > Is there a configuration setting I’m missing or is this simply not > possible? > configuration => perhaps not possible => no, it's possible > > The applet has been self signed.using the java’s keytool and jarsigner > programs. > > I’ve had this same setup working with SQL Server for years now. > > Self signed applet reads db on separate box. > > What is going on with PostgreSQL? > What is going on with PostgreSQL? => likely nothing. > > Sorry for rambling, I’m just so frustrated right now. > Please provide more detailed information... > > Thanks in advance. > > Marc >
On Wednesday 11 April 2007 Marc's cat, walking on the keyboard, wrote: > The bottom line question is can an applet served to a client machine other > than the one the postrgres db resides on read that db? > > An applet I've written and tested on the same box as my database runs fine. Marc's, due to security restriction an applet cannot connect to a server different from the one it has been dowloaded. Exceptions are signed applets. You can provide more functionalities with a n-tier server, for example a servlet running on your web machine that connects to the database server (another machine) and provides data to the applet (that can connect only to the web server). I read below that you have signed the applet and that you've done the same thing with sql server.....have you tried such applet on your sql server configuration (if possible) to ensure that it works and is a postgresql only related problem and not a java one? Could you be more specific on the problem you have?