File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Applets and the fly likes Applets with jdbc Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Applets with jdbc" Watch "Applets with jdbc" New topic
Author

Applets with jdbc

preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
Hi,

I am trying to get the details of a customer fetched from mysql to be displayed in a applet.Is it possible to connect jdbc with applet?

Thanks.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41867
    
  63
It's possible if the database is running on the same host from where the applet is served. If that's not the case, then the applet would need to be signed, to allow it to connect to a different host.

It's considered bad design to use JDBC in applets, though, as it opens up the database to anyone connecting over the network. Within a closed network -say, inside of a company firewall- it may be OK, but it's still something to be thought through. If available, use a secure connection (like SSL) in that case.


Ping & DNS - my free Android networking tools app
preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
Thanks for your reply.Then is it possible to do a input form in html and ,when we submit the page it goes to java page and displays the details fetched from database.like in jsp,<form action="name.jsp" method="post" name="ex">.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41867
    
  63
I'm not sure what you mean by "java page ... like in jsp". If you mean a servlet or JSP, then yes, that's possible - very common stuff. That wouldn't involve an applet, though.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Applets with jdbc