This week's giveaway is in the JDBC forum.
We're giving away four copies of Java Database Connections & Transactions (e-book only) and have Marco Behler on-line!
See this thread for details.
Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

It is not true, Database does not shows through Applet  RSS feed

 
Ranch Hand
Posts: 473
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
People have been telling me that getting data from a database using applet was possible but only if both of them reside on the same computer but it is not true, Database does not shows through Applet. While a standalone with a similar code does work ...comment plz.
 
Bartender
Posts: 20771
124
Android Eclipse IDE Java Linux Redhat Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're accessing the database using JDBC, the applet sandbox won't allow access even when the database is on the same server you loaded the applet from.
You can create a signed applet to enable the JDBC, but firewalls often block JDBC, so the preferred method is to do the JDBC on the server side and use HTTP tunneling to get the data out to the client.
Try doing a search in this forum. It's a common question.
 
Maki Jav
Ranch Hand
Posts: 473
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mr. Tim
Thanx for these valuable words. I am obliged.

Bye
 
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am running an unsigned jar file on an apache webserver with MySQL as the backend DB which is on the same server as Apache and I have no problems accessing the database through the applet on any PC.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Gregg,

Looks like you are using AppletViewer to run your applet. Try to run the same from the browser, I don't think you would be able to connect to the database. Coming to the idea of signing an applet to connect to the database, how easy is that task? Do you need to sign up with a certification authority?? what is required on the database end(residing on some other machine), are any policy files required on the server end???
I have a situation where, I want to embed my applet in my webpage which is on the intranet, and I would like to give the applet previleges to access the db. Can we give access previleges to the applet from the browser to access the db?? I don't want to use a signed applet since my applet is run inside the intranet... ! Any suggestions or help appreciated.
Thanks
Jack.
 
Maki Jav
Ranch Hand
Posts: 473
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why not use Http tunneling?
 
Amateurs built google. Professionals built the titanic. We can't find the guy that built this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!