1. What is Deployment?
Copying the .class file of the Servlet from the current directory to the classes folder of Tomcat (or any Web server) is known as deployment. When deployed, Tomcat is ready to load and execute the Servlet, at anytime, at the client request.
2. What is Deployment Descriptor?
As the name indicates, the deployment descriptor describes the deployment information (or Web Information) of a Servlet. The deployment descriptor is an XML file known as web.xml. XML is the easiest way to give the information to a server, just writing in between the tags, instead of writing in a text file or RDBMS file. The name and tags of web.xml are Servlet API specifications.
3. What information can be stored with deployment descriptor?
The following activities can be done by the programmer in web.xml file. a) Mapping alias name with the actual Servlet name
First and foremost is the alias name to the Servlet. Never a client is given the actual name of the Servlet. Always an alias name is given just for security (avoid hacking). The alias name is given in the following XML tags.
The Servlet comes with two alias names, internal and external. The internal name is used by the Tomcat and the external name is given (to be written in