This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applets with jdbc

 
preethi Ayyappan
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
preethi Ayyappan
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic