Hey Smartie,
You need to do 2 things.
1. In the web.xml, you need to provide a servlet element with the fully qualified class name of the servlet and the name with which you want to access that particular servlet. For example, if you have a servlet class as abc.hello.HelloWorld and if you would like to call it as "hello" then the entry in the web.xml would be as follows:
<servlet>
<servlet-name>hello</servlet-name>
<servlet-class>abc.hello.HelloWorld</servlet-class>
</servlet>
2. You need to map the servlet for an url path so that the servlet can be accessed. For example, if you want to access this servlet by typing "http://myserver:8080/abc/myhello.html", then you need to add a "servlet-mapping" element in the web.xml as follows:
<servlet-mapping>
<servlet-name>hello</servlet-name>
<url-pattern>/myhello.html</url-pattern>
</servlet-mapping>
You can obtain more information on this by reading the Servlet Specification. You can download the latest specification document
here.
Happy Reading..!!
- John