J2EEOnlineJ2EE


JSP Servlets   «Prev  Next»
Lesson 1

Servlets interact with applets

In this module I will discuss how an applet can communicate with a servlet.
When you send information from a form to a servlet, the flow is one-way: the form sends information to the servlet, and in return the servlet sends information to the browser, which replaces the form displayed.
With an applet involved, two-way communication is much simpler.
After completing this module you will be able to:
  1. Design an applet that will communicate with a servlet
  2. Add code to an applet to send a GET request to a servlet
  3. Add code to an applet to read the servlet response
  4. Write a servlet that responds to an applet