this "web.xml" is not your servlet...
web.xml passes the clients request to servlet hiddenly...
so, that the client get no idea where your servlet is placed..
in web.xml
<servlet-mapping>
<url-pattern>foo.do</url-pattern>
<servlet-name>foo file<servlet-name> //this is any name by your choice so, that your xml file knows this
</servlet mapping>
<servlet>
<servlet-name>foo file</servlet-name>
<servlet-class>com.example.foo<servlet-class> // this is the actual path of your servlet in com.example package
</servlet>