Current Position:Home > When to use servlets / when applets

When to use servlets / when applets

Update:11-30Source: network consolidation
hi there,
building a web application when do I use servlet technology and when applets? What are the arguments to let me choose between them? Or combine both servlets and applets? Any ideas/URLs are welcome.

The Best Answer

is it a matter how powerful my servermachine is?
No, not really, but an applet will use the processor on the client and the servlet will use the server's cpu, so that could potentially be an issue for you.
or a matter of security or whatever?
There are security issues with Applets, as they cannot access system resources, but neither can Servlets, so I think that's a non issue.
What exactly do you need to do with the data once you get it out of the database? THAT is the real question! If you want to fetch data and then display the data as text or HTML in a browser, use a servlet. If you need the client to interact with the data in a more sophisticated way, use an Applet. With an Applet, you can put buttons and sliders and whatever and control things, and interact with the application. But a Servlet is not an application, nor is it interactive. A Servlet is called, it gets parameters from an HTTP client, and then it responds, and it's done. An Applet has runtime, and stays running, to interact with the client indefinitely.
I'll give you a real world example. With a Servlet, you might output a web page to a browser, and show an advertisement somewhere on the page. However, an Applet could show an advertisement, and update that ad every few seconds or so, and show one after another, like a slideshow. Even better, an Applet could go get a BRAND NEW ad that was just put in the database and get the new ad at runtime, showing up to the minute results. An Applet could do a stock ticker program, Servlet cannot. Get the difference?
  • When to use servlets / when applets Update:11-30

    hi there, building a web application when do I use servlet technology and when applets? What are the arguments to let me choose between them? Or combine both servlets and applets? Any ideas/URLs are welcome. greetingsis it a matter how powerful my se

  • Servlets and applets Update:11-30

    Hi folks I have a query. I want to call an applet from a servlet. But the problem is whenever i load the servlet the applet doesnt open. Instead I get the error "java.lang.Nullpointer exception". Any idea why this happens and how I can overcome

  • Looking for WEB HOST that I can do servlets and applets on Update:11-30

    Hello everyone, Does anyone know where I can buy web space that will allow me to run a servlet and applet from. I have been shopping today and I had difficutly finding one.Hmm.... well duffymo. I have gone to a number of sites through Google looking

  • Problem: Passing java object Applet to Servlet | Servlet to Applet Update:11-30

    I need that they facilitate links to me for functional examples of passage of objects java from applet to servlet and servlet to applet. Thks.You can do that with URLConnection and Java SerializationRead other 2 answers

  • JAR file does not get uploaded to client for my SERVLET generated APPLET Update:10-11

    Some help please... I have a servlet that generates the HTML code that contains an APPLET. This APPLET needs a JAR file that is listed under its ARCHIVE property. The SERVLET is in a JAR file that is in the same directory as the other needed JAR file

  • How to call  servlet from applet residing in Oracle9i forms bean area. Update:10-11

    Dear Members I have an applet which is calls a servlet for database operations. If access this from a browser it works fine as the applet is signed. But When i place this applet in a bean area of Forms in Oracle 9i. It gives access control exception.

  • Advantages of servlets over Applets.... Update:11-30

    Hi, I know that servlets have advantages over applets.Like it's faster, running on server etc., We have an application running with applets directly talking to databse.Now we are planning to change it to 3 tier using servlets, jsps, etc., Can anyone

  • Fastest way of transferring images from servlet to applet? Update:11-30

    Hi! I have made an applet that shows a large number of images. The way I am doing it now is that I create an ArrayList containing ImageIcons and pass that from the servlet to the applet. What I'm looking for is a faster way of loading and transferrin

  • Problem downloading gif from servlet to applet Update:11-30

    Hi! I have a problem sending a gif from a servlet to an applet. When I accessed the servlet from the browser, I could see the gif displayed in full. However, when I download the gif from the applet and display it out using JLabel, i can only get a sm

  • Calling remote machine servlet from applet Update:11-30

    I got an error when I calling a remote machines servlet. I am calling from applet which is downladed by pluggin. can any body tell me what is the reason the applet is not calling this servlet ? what do i do to solve this problem ? DineshDinesh Enable