Java Reference
In-Depth Information
6
N OTE
The Order.class file must be in the <SERVER_ROOT>djs/WEB-INF/classes/ directory,
or the OrderStatusServlet will not be able to find it.
After you have a chance to look over the source for the OrderStatusServlet , build and install
it to the Tomcat server. You then need to load the OrderStatusApplet into your browser, enter
an order number, and click the Get Status button. Your results should look similar to Figure 6.2.
F IGURE 6.2
Results from OrderStatusServlet .
Pros and Cons of Applet-to-Servlet Communication
As you have seen in the previous sections, HTTP tunneling is a very simple method for applet-
to-servlet communication, but it does have its own set of pros and cons. Some of the pros of
using HTTP tunneling are as follows:
It is simple to use because of the Serializable interface.
It is very fast for lightweight objects.
 
Search WWH ::




Custom Search