Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

applets

  Asked By: Alma    Date: Aug 01    Category: Java    Views: 695
  

I am a beginer in java development.I want to develop
an applet and connect it to a database on a server on
the internet.I want to read information and write it
to the database using the applet.I wonder if I can do
it without refreshing the applet or the html page that
contains it.What should I use and how can I do such
things?

Share: 

 

4 Answers Found

 
Answer #1    Answered By: Balbir Kaur     Answered On: Aug 01

I don't get you, why do you think you should refresh your applet?

 
Answer #2    Answered By: Rene Sullivan     Answered On: Aug 01

Applet are the same as Application,
the differece is that they plug in browsers to run (load).
So they connect  to their server  just like the way
stand alone applications do.

So you dont have to refresh your page  to update your
data on applet.

An applet  can be serviced by a server, or can be a graphical plugin
showing an animation like Flash plugins.

If you knew distributed applications or multi tier applications
which their client is a RICH Client (not THIN (not web based client))
you would understand that an applet directly connected to a server
is not a thin client but a rich one.

So there is no need to update it using refeshing your browser,
it can be as powerful as a stand alone application, if it has
enough permission to the client machine's resources.

 
Answer #3    Answered By: Milton Robinson     Answered On: Aug 01

You can not directly write  your data to the database.
the sand box doesn't let you or you have to sign your
applet which is really a bother.
instead, the simple way is that you send you data as a
serialized object to your server  side servlet and let
the servlets do the rest.

 
Answer #4    Answered By: Vinit Online     Answered On: Aug 01

The best solution for doing such stuff is web services.



The applet  sand box initially designed for preventing the applet from malicious operation on client machine, but the reason that may cause the sand box prevent the database  connection is that the applet tries to get a connection on the different port and IP address in compare to where it came. (This problem can be fixed by changing java  security policy file on the client machine).



The applet page  does not need to be refreshed for every JDBC operation and it can be initialized once and stay running on the client JVM.



Anyway, although the problems can be solved this, It ‘s not recommended in any application as this is a bad design and ….

 
Didn't find what you were looking for? Find more on applets Or get search suggestion and latest updates.




Tagged: