3.2.3  Developing and Running an Example Application 
The example application will consist of the Servlet shown in Section 3.1.3, and an HTML form 
that is used to provide the Servlet with the necessary parameters to generate some dynamic 
output.  Creating the HTML Page and Registering It with the Repository 
The source code for the HTML page is shown below. Store the code under the name 
draw_rectangle.html in the web/ directory of the source tree. The form draw_rectangle.html is a 
plain HTML page; it does not contain any dynamically generated data. It serves only to provide 
the servlet with the necessary parameters to run. 
 Draw a Rectangle 

Servlet Demonstration Draw a Rectangle

when the "Submit" button is pressed. The URL is mapped to the
correct Java class by the Servlet Engine   >

Please enter the desired width and height:

Schedule the draw_rectangle.html file for addition to the repository with the following command: 
$ cvs add draw_rectangle.html
Please note that the cvs add command does not yet store the file in the repository. This gives 
you the opportunity to test the file before committing it to the repository. Committing the file will 
be handled later on in Section 

Java Web Hosting Application Development Using Java Technologies Hosting

TotalRoute.net Business web hosting division of Vision Web Hosting Inc. All rights reserved.