RE: Accesing MySQL database through Applets
If you include the right driver/libraries in your applet's jar you likely COULD connect to the database from an Applet (if the database permissions were set up so the user could connect from anywhere). I agree that this is probably not a good idea though. The pipe that the connection uses isn't secured AT ALL (as far as I know). Far better to use some form of encrypted (ssl perhaps) pipe to talk to something on the server side that does the database calls for you. I've been thinking about setting up a simple servlet that uses https to secure the pipe. It would take xml database requests and respond with xml result sets (with user validation of course :) ). An applet could then access the database, but in a more secure manner than doing so directly. -Original Message- From: Jann VanOver [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 15, 2001 7:12 PM To: '[EMAIL PROTECTED]' Subject: RE: Accesing MySQL database through Applets Connecting to a database through Applet? Can you do that? Gosh, that sends chills down my spine. Applets are Client-side things. Database access is usually done Server-side. Someone, please tell me that Applets CAN'T make server database connections! -Original Message- From: Dana Marcusanu [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 22, 2001 4:58 PM To: [EMAIL PROTECTED] Subject: Accesing MySQL database through Applets I am using Tomcat version 3.2.1. I am trying to connect to a data base from an applet and I am getting the following error: 2001-04-22 05:41:00 - Ctx( /examples ): 404 R( /examples + /jsp/student/org/gjt/ mm/mysql/Driver.class + null) null My driver is in: C:\tomcat\jakarta-tomcat-3.2.1\lib My applet is in: C:\tomcat\jakarta-tomcat-3.2.1\webapps\examples\jsp\student What can I do to connect the database from the applet? Should I give some permissions? Thanks, Dana __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
Re: Accesing MySQL database through Applets
If I'm not mistaken, your applet can only communicate with the server it was called from. Even taking that into consideration your applet will most likely have to be signed, which implies the purchase of a costly certificate from verisign or another certification authority. You can make your own certificate, but that wont do for production. Secondly, it's a bad idea to do JDBC from Applet cause your clients JVM won't allow it, you'll have to include mucho packages with your applet which will make it huge... You can try calling your applet from a servlet or jsp and pass the data pulled out of the db in the html applet tag... that's what I usually do Cheers, AD. - Original Message - From: Devon Ziegler [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 16, 2001 5:53 PM Subject: RE: Accesing MySQL database through Applets If you include the right driver/libraries in your applet's jar you likely COULD connect to the database from an Applet (if the database permissions were set up so the user could connect from anywhere). I agree that this is probably not a good idea though. The pipe that the connection uses isn't secured AT ALL (as far as I know). Far better to use some form of encrypted (ssl perhaps) pipe to talk to something on the server side that does the database calls for you. I've been thinking about setting up a simple servlet that uses https to secure the pipe. It would take xml database requests and respond with xml result sets (with user validation of course :) ). An applet could then access the database, but in a more secure manner than doing so directly. -Original Message- From: Jann VanOver [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 15, 2001 7:12 PM To: '[EMAIL PROTECTED]' Subject: RE: Accesing MySQL database through Applets Connecting to a database through Applet? Can you do that? Gosh, that sends chills down my spine. Applets are Client-side things. Database access is usually done Server-side. Someone, please tell me that Applets CAN'T make server database connections! -Original Message- From: Dana Marcusanu [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 22, 2001 4:58 PM To: [EMAIL PROTECTED] Subject: Accesing MySQL database through Applets I am using Tomcat version 3.2.1. I am trying to connect to a data base from an applet and I am getting the following error: 2001-04-22 05:41:00 - Ctx( /examples ): 404 R( /examples + /jsp/student/org/gjt/ mm/mysql/Driver.class + null) null My driver is in: C:\tomcat\jakarta-tomcat-3.2.1\lib My applet is in: C:\tomcat\jakarta-tomcat-3.2.1\webapps\examples\jsp\student What can I do to connect the database from the applet? Should I give some permissions? Thanks, Dana __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
RE: Accesing MySQL database through Applets
Connecting to a database through Applet? Can you do that? Gosh, that sends chills down my spine. Applets are Client-side things. Database access is usually done Server-side. Someone, please tell me that Applets CAN'T make server database connections! -Original Message- From: Dana Marcusanu [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 22, 2001 4:58 PM To: [EMAIL PROTECTED] Subject: Accesing MySQL database through Applets I am using Tomcat version 3.2.1. I am trying to connect to a data base from an applet and I am getting the following error: 2001-04-22 05:41:00 - Ctx( /examples ): 404 R( /examples + /jsp/student/org/gjt/ mm/mysql/Driver.class + null) null My driver is in: C:\tomcat\jakarta-tomcat-3.2.1\lib My applet is in: C:\tomcat\jakarta-tomcat-3.2.1\webapps\examples\jsp\student What can I do to connect the database from the applet? Should I give some permissions? Thanks, Dana __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
Re: Accesing MySQL database through Applets
Jann VanOver wrote: Connecting to a database through Applet? Can you do that? Gosh, that sends chills down my spine. Applets are Client-side things. Database access is usually done Server-side. Someone, please tell me that Applets CAN'T make server database connections! There are two posibilities... (1) You connect to your database which has your WebServer/Servlet Container...;-). In other words, to the originating place... (2) Another posibility is to connect to a servlet and have that servlet talk you your database via JDBC. Have the servlet talk to your applet using XML and vice-versa... But remmember to compress your data transmission to accomodate for the network latency your clients may incur...;-) And... Don't forget to sign your applets...;-) Cheers, John Clark -- /) John Clark Naldoza y Lopez (\ / )Software Design Engineer II ( \ _( (__ Web-Application Development_) )_ (((\ \ /_Cable Modem Network Management System _\ / /))) ( \_/ / NEC Telecom Software Phils., Inc. \ \_/ ) \ / \ / \_/ phone: (+63 32) 233-9142 loc. 3112\_/ / / cellphone: (+63 919) 399-4742 \ \ / / email: [EMAIL PROTECTED]\ \
Accesing MySQL database through Applets
I am using Tomcat version 3.2.1. I am trying to connect to a data base from an applet and I am getting the following error: 2001-04-22 05:41:00 - Ctx( /examples ): 404 R( /examples + /jsp/student/org/gjt/ mm/mysql/Driver.class + null) null My driver is in: C:\tomcat\jakarta-tomcat-3.2.1\lib My applet is in: C:\tomcat\jakarta-tomcat-3.2.1\webapps\examples\jsp\student What can I do to connect the database from the applet? Should I give some permissions? Thanks, Dana __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/